Thursday, 28 January 2016

File permissions in Linux [with infographics]

The Linux/Unix systems are multi-user systems and each file and directory has its own permission. This is in fact can be related to the origin of Unix which was conceived as a network system with multi users simultaneously working in the same environment. In that case, it is important to distinguish each file and directory's access rights to keep it secure. It is important to control which user has the right to modify or delete any file or directory.

Check file permission symbols

Run the command ls -l and you will the list of files and directories like below:

-rw-r--r--  1  ambarish  users  1201  Dec 12  13:10 info.txt

This basically represents that the file info.txt was created on Dec 12, at 13:10 and has a size of 1201 bytes. It belongs to the group "users" and is owned by the user "ambarish" in particular.

-rw-r--r--, drw-r--r-- basically represents the file permission.

1 - denotes the file type. a hyphen (-) denotes a regular file. "d" denotes a directory.
2,3,4 denotes read, write, execute permissions for the owner of file.
5,6,7 denotes read, write, execute permissions for members of group owning the file.
8,9,0 denoted read, write, execute permissions for all other users.

How to set permission of a file/directory

We can use chmod command in Linux to set permission of a file or a directory. They syntax is

chmod [permissions] [filename]

The permission can be assigned to any file or directory using the octal number system. 4 represents read access, 2 for write and 1 is for the access to execute.

So, if you want to assign a file read / write / execute access, it will be 4+2+1=7.

e.g.    chmod 777 info.txt 

will change the file access rights such that owner, group, and others and read, write and execute the file. You have to work out with the numbers.

7 = 4+2+1 - read, write, execute
6 = 4+2 - read write
5 = 4+1 - read execute
4 - read
3 = 2 + 1 write, execute
2 - write
1 - execute

Here's an infographic showing the file permissions in Linux/Unix.

File permissions in Linux infographics


Anything I missed? Please add it in the comments section.

Wednesday, 27 January 2016

Richard Stallman on freedom in your computer and in the net

Here's another awesome Richard Stallman speech on freedom in your computer and in the internet.
He discuss about the distinction between free and proprietary software, why not to use SaaS - Software as a Service, put lights on Open Source and why he don't use the word "Open Source".

He demands that every university should teach reverse engineering, schools must teach free software and civic ideas of free software. Here's the complete video.

Tuesday, 26 January 2016

How to upgrade / Install LibreOffice 5.0.4 in your PC

LibreOffice 5.0.4 logo
Its been more than a month now since LibreOffice 5.0.4 has been released and is now available for download and upgrade. LibreOffice is a free and open source office suite, an open source alternative to Microsoft Office developed by The Document Foundation available for different Operating Systems like Microsoft Windows, Mac OS X, and Linux. Originated from in 2010, it is now the most widely used office suite for Linux users. The LibreOffice suits includes word processor, spreadsheets editor, slideshow creator, diagrams and drawings creator, database and mathematical formula support.

LibreOffice is available in 110 languages and is compatible with other office suites like Microsoft Office and OpenOffice.Org. So, before we see how to download and install LibreOffice in your system, lets see what is the system requirements. LibreOffice 5.0.4 is the latest release which includes bugs fixes from the last release is much more stable.

System Requirements for LibreOffice 5.0.4


  • Microsoft Windows XP SP3, Vista, Windows Server 2008/2012, Windows 7/8/10.
  • Pentium III or above processor
  • 256 MB RAM (512 MB is recommended)
  • 1.5 GB of free storage
  • 1024x768 resolution or higher.

Apple -Mac OS X

  • Mac OS X 10.8 or higher
  • Intel processor with 512 MB of RAM and 800 MB of free disk storage
  • 1024x768 graphic device or higher resolution


  • Linux kernel v2.6.18 or higher
  • glibc version 2.5 or higher
  • gtk version 2.10.4 or higher
  • 256 MB RAM - 512 MB is recommended
  • 1.55 GB of free storage.
  • Gnome 2.16 or higher.
  • X server with 2014x768 resolution, or higher

How to download/install LibreOffice 5.0.4 in Windows

Download LibreOffice for Windows from the official website: LibreOffice for Windows

Open the installer by double clicking it, and follow the steps through the set up.

The typical set up will install the default components including user interface languages and spelling dictionaries matching your current language settings.

In Custom Installation, you can choose the program features you want to install and the path of installation.

In the File Type dialogue box, you can choose the LibreOffice to be the default application for Microsoft Office file types.

Click on next and Finish. You have now successfully installed LibreOffice in your Windows PC.

Download LibreOffice for Mac OS X

Download the .DMG file from the official website: LibreOffice for Mac OS X

Double click the .DMG file. There is an installation window, drag and drop the LibreOffice icon to the Applications folder.

The installation will proceed further and notify you when completed.

Download and Install LibreOffice in Linux

Download the LibreOffice 5.0.4 from its official website: LibreOffice for Linux 

You will have a .tar.gz archive. Right click on the downloaded archive and select "Extract here".

Open your terminal, and navigate to the directory where you extracted the archive.

To install the .deb package, use the following command,

sudo dpgk -i *.deb

You can upgrade to LibreOffice 5.0.4 if you are running an earlier version by using the following commands:

sudo add-apt-repository ppa:libreoffice/libreoffice-5-0-4
sudo apt-get update
sudo apt-get dist-upgrade

Help needed: I'm need of LibreOffice screenshot for different Linux Distributions. Please mail me at Sharing is caring!

Saturday, 23 January 2016

How to reset password in Linux Mint

Recover Linux Mint Password
Linux Mint has grown to the one of the best Linux distributions and is highly user friendly. Instead of trying various things, the Mint developers are always polishing the OS in itself and it does provide one the best UI and ease to use Linux Distribution. However, sometimes the users often forgets the passwords and are unable to login to their Linux Mint system. There is not to worry much. By following simple steps, you can easily reset password in Linux Mint and keep on working in th Linux environment. If you have forgot your login/password in Linux Mint, you can easily reset your Linux Mint password.

Follow these steps to reset your password in Linux Mint.

Reboot your system and press the Shift key while your system starts. It will enable GNU GRUB2 menu for you. If you are dual booting with Windows, the screen where you are asked to choose the OS is the GRUB menu, so you are already there.

Select the Linux Mint option from where you login, and press e to edit.

You will see

linux /boot/vmlinuz-[kernel version]-generic root=UUID=[letters and numbers]\[letters and numbers] ro quiet splash vt.handoff=7

GRUB MENU screenshot

at the end of the screen. Navigate to the above line and replace ro quiet splash vt.handoff=7 with rw init = /bin/bash

Now, the line will look like 

linux /boot/vmlinuz-[kernel version]-generic root=UUID=[letters and numbers]\[letters and numbers] rw init=/bin/bash

Press F10 to boot your system. The system will boot in a password less boot shell. Type the following command in the terminal to reset your password:

passwd <username>

Linux Mint will ask your password for the username you just provided, and will confirm it.
GRUB MENU screenshot

Restart your system, and now you can easily login to your Linux Mint with the new username/ password. Remember that the changes you made above, you do not need to revert it back. Just restart the system when you are finished changing the password in your Linux Mint system.