Linux Filesystem Hierarchy Standard


Linux Filesystem Hierarchy Standard

The Linux Filesystem Hierarchy Standard (FHS) is a set of guidelines that define the directory structure and naming conventions used in Linux distributions. It specifies where files and directories should be located and what they should be used for.

Here are some of the key directories defined by the FHS:

  • /bin: Contains essential binaries, such as system utilities that are required by all users.
  • /boot: Contains the files needed for booting the system.
  • /dev: Contains device files, which represent hardware devices and peripherals.
  • /etc: Contains configuration files for system-wide settings.
  • /home: Contains user home directories.
  • /lib: Contains shared library files needed by the system and other programs.
  • /media: Contains mount points for removable media devices, such as USB drives and CDs.
  • /mnt: Contains mount points for temporary filesystems, such as NFS shares.
  • /opt: Contains optional software packages that are not part of the default installation.
  • /proc: Contains virtual files that represent system and process information.
  • /root: The home directory for the root user.
  • /run: Contains system and runtime data that is volatile and may be lost between system reboots.
  • /sbin: Contains essential system binaries that are typically run by the system administrator.
  • /srv: Contains data for services provided by the system.
  • /sys: Contains virtual files that represent and allow access to kernel data structures.
  • /tmp: Contains temporary files that may be deleted at any time.
  • /usr: Contains the majority of user binaries, libraries, and documentation.
  • /var: Contains variable data, such as logs, mail, and spool files.

It's important to understand the FHS because it helps to ensure consistency and compatibility between different Linux distributions. It also makes it easier for users to find and manage files and directories.

Helpful Resources


Complete and Continue