Also known as: FHS
The Filesystem Hierarchy Standard (FHS) is the convention that defines where things go on a Unix-like filesystem. Maintained today by the Linux Foundation, it standardises the meaning of /bin, /usr, /etc, /var, /home, /tmp, and the other top-level directories. Distributions differ in countless small ways but almost all conform to the FHS, which is why a file you know exists on one system can usually be found at the same path on another.
The broad layout:
/bin,/sbin,/lib— essential binaries and libraries for the base system/usr— secondary hierarchy with the bulk of user-installed software/etc— host-specific configuration files/var— variable data: logs, mail, spools, caches/home— user home directories/tmp,/var/tmp— temporary files/proc,/sys,/dev,/run— kernel and runtime interfaces/opt,/srv,/media,/mnt— optional software, service data, removable media, ad hoc mounts/root,/boot— root user home and kernel boot files
Most modern distributions now implement the usr merge: /bin and /sbin are symlinks to /usr/bin and /usr/sbin, simplifying the historical two-tier split. The FHS is ultimately a social contract rather than enforced by the kernel, but its predictability is invaluable: scripts, packages, and documentation all rely on it.
Discussed in:
- Chapter 4: The Filesystem Hierarchy — Why There Is a Standard
Also defined in: Textbook of Linux