Linux File System Hierarchy

The Linux File Hierarchy Structure or the Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Unix-like operating systems.It is maintained by the Linux Foundation

/ (root directory)

/ (root directory) :

Primary hierarchy root and root directory of the entire file system hierarchy.

/bin :

This is the directory that has all the binary files of some important programs on the operating system. This directory holds the data about the most used commands related to making(mkdir), moving(mv), copying(cp), listing(ls), and removing(rm) a directory or file. According to the Linux Filesystem Standards, this directory cannot have subdirectories.

/boot :

Boot loader files, e.g., kernels, initrd.

/dev :

This directory holds the files of the devices like a USB Device or a Hard Drive. Most of the files are either created on the boot time or when a device is attached.

/etc :

This directory is for those types of configuration files and folders

/home :

Users’ home directories, containing saved files, personal settings, etc

/lib :

These are the folders where libraries are stored. Libraries are some files that are needed by any application to perform several tasks or functions. For example, these libraries may be needed by the binary files in the /bin directory.

/media :

This is the directory where all the external connected storage devices are mounted automatically. We do not need to do anything in this directory because it is managed by the Operating System itself, but if we want to mount storage devices manually, we have the /mnt directory for that purpose.

/mnt :

Temporarily mounted filesystems.

/opt :

This is the optional folder. It is the directory where manually installed software by vendors is placed.

/sbin :

Essential system binaries, e.g., fsck, init, route

/tmp :

This is a temporary directory and holds the temporary files of the applications running on the system.

/usr :

This directory contains the applications installed and used by the user. It is also known as the “UNIX System Resources”. It also has its own /bin, /sbin, and /lib directory, which is different from the superuser’s /bin, /sbin, and /lib directories.

/proc :

This is the directory with the pseudo files. The pseudo files contain information about the processes.

Liked This Article?

Leave a Reply

Your email address will not be published. Required fields are marked *