LINUX FILE SYSTEM HIERARCHY

The file system hierarchy

All files on a Linux system are stored on file systems which are organized into a single inverted tree of directories, know as a file system hierarchy.In the inverted tree, root lies at the top and the branches of directories and sub-directories stretch below the root.

linux-filesystem.png

Figure: Significant file system directories (RHEL 7)

Here, the directories ‘/’ is the root directory which lies at the top of file system hierarchy. The ‘/’ character is also used as a directory separator in the file name, for example ‘/etc’ is a sub-directory of ‘/’ directory.

Important RHEL (Red Hat Enterprise Linux) directories

Location Purpose
/usr Installed software, shared libraries, include files, and static read-only program data. Important subdirectories include:-

* /usr/bin: User commands.

* /usr/sbin: System administration commands.

* /usr/local: Locally customized software.

/etc Configuration files specific to this system.
/var Files that dynamically change (e.g. databases, cache directories, log files, printer spooled documents, and website content) may be found under /var.
/run Run-time 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 directories where regular users store their personal data and configuration files.
/root Home directory for the administrative superuser, root.
/tmp A world-writable space for temporary files. Files more than 10 days are automatically be deleted from that directory. Another temporary directory exists at /var/tmp, in which files that have not been accessed,changed, or modified in more than 30 days are 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.

Important

In RHEL Linux 7, Four oulder directories in ‘/’ now have identical contents as their counterparts located in /usr:

– /bin and /usr/bin

– /sbin and /usr/sbin

– /lib and /usr/lib

– /lib64 and /usr/lib64

In older versions of RHEL, these were distinct directories containing different sets of files. In RHEL 7, the directories in ‘/’ are symbolic links to the matching directories in /usr.

Thank you.

For more reading materials please click here

Advertisements