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)
/bin
/boot
/dev
/etc
/home
/lib
/media
/mnt
/opt
/sbin
/tmp
/usr
/proc
/ (root directory) :
Primary hierarchy root and root directory of the entire file system hierarchy.
Every single file and directory starts from the root directory
The only root user has the right to write under this directory
/root is the root user’s home directory, which is not the same as /
/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.
Kernel initrd, vmlinux, grub files are located under /boot
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
Home directories for all users to store their personal files
example: /home/kishlay, /home/kv
/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.