What Is the Linux Filesystem Hierarchy Standard Step by Step
The Filesystem Hierarchy Standard sets where files belong on Linux. See what it requires, what the usr merge changed, and how distributions bend the rules.

Why does the SSH server read /etc/ssh and not some folder beside the program? Why does Docker keep its images under /var/lib? Because the Filesystem Hierarchy Standard, written in 1994 as the FSSTND and later renamed, says that is where such files go. A tour of the folders is in the Linux directory structure post; this one is about the rules behind it, one layer under the Linux command line every developer needs.
The standard described is FHS 3.0, published by the Linux Foundation in 2015. Where distributions differ, the comparison is for Debian 13 and Fedora 42.
The two axes
The FHS organizes directories along two questions. Can the files be shared between machines (for example over NFS), or are they specific to one host? And are they static, changed only by an administrator, or variable, changed by running software?
| Shareable | Not shareable | |
|---|---|---|
| Static | /usr, /opt | /etc, /boot |
| Variable | /var/mail, /var/spool/news | /var/run, /var/lock |
That is why programs are in /usr and logs are in /var: they could live on different disks, with the first mounted read-only. The idea matters less than it did in the era of diskless workstations, but it explains the layout and it still lets you mount /var on a separate partition so a runaway log cannot fill the root filesystem.
What the standard requires
At the top level, it requires /bin, /boot, /dev, /etc, /lib, /media, /mnt, /opt, /run, /sbin, /srv, /tmp, /usr and /var. Home directories, /root and a few more are optional or only recommended. Under /usr, it defines bin, lib, local, share and others; under /var, log, cache, lib, spool and tmp. The text is public at the Linux Foundation's specification page.
The usr merge
The FHS says /bin holds the commands needed to boot and repair a system and /usr/bin holds the rest. The distinction went back to when /usr could be a separate disk that was not mounted at early boot. Today an initial RAM disk mounts /usr before anything needs it, so the split solves nothing. Fedora merged the directories in 2012; Debian made it the default in 12 and Ubuntu earlier. On those systems:
ls -ld /bin /sbin /libshows three symbolic links to usr/bin, usr/sbin and usr/lib. The practical meaning is that a script with #!/bin/bash and one with #!/usr/bin/bash run the same file. On systems that have not merged, they may not.
Where distributions leave the standard
- NixOS and Guix install each package into its own store path, such as
/nix/store/..., and build/bin/shand/usr/bin/envas the only compatibility links. A script with#!/bin/bashfails there, which is another argument for#!/usr/bin/env bash. - Immutable systems such as Fedora Silverblue keep
/usrread-only, and/optand/usr/localare redirected under/var. - Containers follow the layout of their base image; a distroless image may have no
/binat all.
Why this helps in practice
Because the rules are shared, you can predict locations: configuration in /etc, state in /var/lib, logs in /var/log, your own builds in /usr/local. When you install your own software, follow them. Put a script you wrote in /usr/local/bin, not /usr/bin, because the package manager owns the second. When a disk fills, they tell you where to look first, as finding and deleting large files shows.
Seeing the standard in a live system
The Filesystem Hierarchy Standard is short enough to check directly. Three of its rules show up in a single command run: the root directory holds only what boot and repair need, /usr holds the shareable read-only bulk, and /var holds data that changes while the system runs. On Debian 13 this comes out as follows.
readlink -f /bin/ls /sbin/ip /lib
df -h / /usr /var 2>/dev/null | awk '{print $1, $6}'
findmnt -no TARGET,OPTIONS /proc/usr/bin/ls
/usr/sbin/ip
/usr/lib
Filesystem Mounted
overlay /
overlay /
overlay /
/proc rw,nosuid,nodev,noexec,relatime
In a container all three directories sit on one overlay filesystem, so they share a mount. On a server built to the standard's spirit they are often separate: /usr read-only, /var on its own volume so a runaway log cannot fill the root, and /tmp mounted noexec. The standard is what makes those splits possible, because it promises that no program needs to write into /usr while running.
Static or variable, shareable or not
The two axes from the start of the post produce four cells, and each directory sits in one. /usr is shareable and static, so several machines could mount the same copy read-only. /etc is static but not shareable, because every host has its own configuration. /var/spool is variable and not shareable. /var/mail and /var/www are variable and may be shared. The classification matters in practice for backups: static, shareable data is rebuilt from packages and needs no backup, while variable data is what you have to protect. A backup plan that copies /etc, /home, /srv and the data directories under /var/lib covers a typical server, and skips /usr, /proc, /sys, /dev and /run.
What it means when you write software
An application that follows the standard puts its files in predictable places: binaries in /usr/bin or /usr/local/bin, defaults in /usr/share/appname, host-specific settings in /etc/appname, state in /var/lib/appname, logs in /var/log/appname and runtime files in /run/appname. Each of those has an owner who should write there, and a systemd unit can enforce that by declaring StateDirectory=appname and LogsDirectory=appname, which creates the directories with the right owner at start. An application that keeps its state next to its binary is the one that breaks the first time someone mounts /usr read-only or runs it as an unprivileged user.
Checking a system against the standard
The standard is a convention, and you can test how closely a machine follows it in a few seconds. Run ls / and compare it with the required list, then check ls /usr for bin, lib, share and local. Differences are normal: containers omit directories they do not need, and distributions add their own. Treat a missing required directory as a hint about the kind of system you are on, not as an error to fix.
Limits of the standard
The FHS has not been revised since 2015, it says nothing about /proc and /sys layouts beyond mentioning them, and the user-space conventions around systemd and XDG directories sit outside it. For those, read the systemd file-hierarchy(7) page, which describes the layout systemd assumes.


