Linux File System Hierarchy

Linux File System Hierarchy

Objectives :

After completing this section, you should be able to understand fundamental file system layout, organization, and the location of key file types.

The Linux File System Hierarchy

All files in a Linux system are stored on file system which are organized into a single inverted tree of directories, known as a Linux File System Hierarchy . This tree is inverted because the root of the tree is said to be the top of the hierarchy, and the branches of the directories and sub-directories stretch below the root.
Linux File System Hierarchy
Linux File System Hierarchy
The directory / is the root directory at the top of the file system hierarchy. The / character is also used as a directory separator in file names. For example, if etc is a sub-directory of the / directory, we could call that directory /etc. Likewise, if the /etc directory contained a file name issue, we could refers to that file as /etc/issue.
Sub-directory of / are used for standardized purpose to organize files by type and purpose. This makes it easier to find files. For example, in the root directory, the sub-directory /boot is used for storing files needed to boot the system.
The following terms are encountered in describing Linux File System directory contents:
  – static is content that remains unchanged until explicitly edited or reconfigured.
  – dynamic or variable is content typically modified or appended by active  processes.
  – persistent is content, particularly configured settings, that remain after a reboot.
  – runtime is process or system-pacific content or attributes cleared during reboot.
The following table lists some of the most important directories on the system by name and purpose.
Important Linux File System Hierarchy
Location Purpose
/usr Installed software, shared libraries, include files, and static read-only program data. important sub-directories include:
/usr/bin : User commands.
/usr/sbin : System administration commands.
/usr/local : Locally customized software.
/etc Configuration files specific to the system.
/var Variable data specific to the system that should persist between boots. Files that dynamically change.
/run runtime data for processes started since the last boot. This includes process ID files and lock files, among other things. The contents of this directory are recreated on reboot.
/home Home directory where regular users store their personal data and configured files.
/root Home directory for the administrative superuser, root.
/tmp A world-writable space for temporary files. Files which have been accessed changed, or modified for 10 days are deleted from this directory automatically. Another temporary directory exists, /var/tmp, in which files that have accessed, changed, or modified in more than 30 days deleted automatically.
/boot Files needed in order to start the boot process.
/dev Contains special device files which are used by the system to access hardware.

In RHEL 7, four older directories in / now have identical content as their counterparts located in /usr:
/bin and /usr/bin.
/sbin and /usr/sbin.
/lib and /usr/lib.
/lib64 and /usr/lib64.

In older version of RHEL, these were distinct directories containing different set of lines. In RHEL 7, the directories in / are symbolic links to the matching directories in /usr.

I have tried to highlight Linux File System Hierarchy. However, this is not end of it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s