Filesystem Hierarchy Standard (FHS)
The Filesystem Hierarchy Standard (FHS) is a reference describing the conventions used for the layout of a UNIX system. It has been made popular by its use in Linux distributions, but it is used by other UNIX variants as well.
Purpose
The FHS was created to provide a standardized directory structure for UNIX-like operating systems. This standardization helps users and developers predict where to find files and directories, making it easier to:
- Write and maintain software that works across different UNIX systems
- Understand where to find system files and programs
- Maintain consistency across different Linux distributions
Key Directories
-
/bin
- Essential command binaries that all users may need /boot
- Static files of the boot loader/dev
- Device files/etc
- Host-specific system configuration/home
- User home directories/lib
- Essential shared libraries and kernel modules-
/mnt
- Mount point for temporarily mounted filesystems /opt
- Optional application software packages-
/proc
- Virtual filesystem providing process and kernel information /root
- Home directory for the root user/sbin
- Essential system binaries/tmp
- Temporary files/usr
- Secondary hierarchy for read-only user data/var
- Variable files
Benefits
Following the FHS provides several advantages:
- Predictable system layout across different distributions
- Easier software installation and maintenance
- Better system administration and troubleshooting
- Improved compatibility between different UNIX-like systems
Version History
The FHS has evolved over time, with major versions including:
- FHS 1.0 (1994)
- FHS 2.0 (1997)
- FHS 2.1 (2000)
- FHS 2.2 (2001)
- FHS 2.3 (2004)
- FHS 3.0 (2015)
The standard is maintained by the Linux Foundation and continues to be updated to reflect modern UNIX and Linux system needs.