Linux Filesystem Hierarchy Standard Explained

The Filesystem Hierarchy Standard (FHS) is a reference specification that defines the directory structure and directory contents in Linux and other Unix-like operating systems. This article provides a clear, concise overview of what the FHS is, why it was established, and the specific roles of the primary directories located within the root filesystem. Understanding this layout allows system administrators, developers, and users to navigate, manage, and troubleshoot any standardized Linux distribution effectively.

What is the Filesystem Hierarchy Standard?

Maintained by the Linux Foundation, the Filesystem Hierarchy Standard establishes a predictable layout for files and directories. Prior to standardizing this structure, different Unix-like distributions often stored configuration files, executables, and libraries in varying locations. The FHS eliminates this fragmentation by ensuring that software developers, system administrators, and users can rely on consistent file locations across various Linux distributions, such as Ubuntu, Fedora, Debian, and CentOS.

The standard categorizes files along two main axes:

The Root Directory (/) and Essential Subdirectories

In Linux, all files and directories exist under a single hierarchy originating at the root directory, represented by a single forward slash (/). Under the FHS, the root partition contains only the directories necessary to boot, restore, recover, or repair the system.

Secondary Hierarchies and Data Stores

Virtual Filesystems

The Importance of the FHS

Adherence to the FHS ensures software interoperability across the broader Linux ecosystem. It guarantees that scripts, compiled binaries, and package managers work reliably without extensive path reconfigurations, maintaining stability, security, and predictability across heterogeneous system environments.