
The Filesystem Hierarchy Standard (FHS) is a set of directories that should exist in every Linux distribution. The reason for having the Filesystem Hierarchy Standard is so that regardless of the distribution being used, the structure of the filesystem will be the same. The Filesystem Hierarchy Standard has the following directories under the / (root) directory.
/bin
The /bin (binary) directory contains binary files, such as /bin/ls and /bin/pwd. The binary files are commands that can be run by anyone - these commands do not require elevated privilege to be execute.
/boot
The /boot directory contains files related to booting the computer, such as the GRUB configuration file and the initrd image.
/dev
The /dev (devices) directory contains files for both physcial and virtual devices, such as /dev/ha1 (hard disk drive), /dev/sda1 (solid state drive), and /dev/tty1 (first virtual console).
/home
The /home drectory contains each users personal files and folders.
/lib
The /lib (library) directory contains shared library files used by programs and kernel modules.
/media
The /media directory is typically used to mount devices such as USB flash drives, CDROM drives, and smart phones.
/mnt
The /mnt (mount) directory is typically used to mount remote shares, such as Samba or NFS share.
/opt
The /opt directory contains files and folders for software, such as a package installed on the PC.
/proc
The /proc (processes) directory contains files for each process, such as /proc/meminfo and /proc/cpuinfo.
/sbin
The /sbin (super user binary) directory contains binary files, such as /sbin/shutdown and /sbin/ifdown. The binary files are commands that require elevated privilege to be executed.
/sys
The /sys (system) directory contains files for drivers to talk to applications.
/tmp
The /temp (temporary) directory contains temporary files.
/usr
The /usr directory contains most of the system programs and libraries, such as /usr/bin, /usr/lib, and /usr/local.
/var
The /var (variable) directory contains files that can change, such as log files (/var/log/messages) and website files (/var/www/html).
Did you find this article helpful?
If so, consider buying me a coffee over at