The Filesystem Hierarchy Standard and Its Variants
The Filesystem Hierarchy Standard and Its Variants
Every Linux distribution organizes its files within a unified single-rooted hierarchical directory tree (/). The conventions governing where binaries, libraries, configuration files, and state directories reside are defined by the Filesystem Hierarchy Standard (FHS), maintained by the Linux Foundation.
/
├── bin -> usr/bin # Essential binaries (symlinked in modern layouts)
├── sbin -> usr/bin # System binaries (symlinked in modern layouts)
├── lib -> usr/lib # Essential shared libraries
├── usr/ # Primary read-only userland hierarchy
│ ├── bin/ # Non-essential and essential user binaries
│ ├── lib/ # Object files and internal libraries
│ ├── include/ # C/C++ header files for compilation
│ └── share/ # Architecture-independent data (man, icons, fonts)
├── etc/ # Host-specific static configuration files
├── var/ # Variable runtime data (logs, spool, caches)
│ ├── log/ # System log files
│ ├── cache/ # Package manager caches
│ └── lib/ # Persistent application state
├── dev/ # Device nodes (populated dynamically by devtmpfs)
├── proc/ # Kernel process and status pseudo-filesystem
├── sys/ # Kernel device model and sysfs hierarchy
├── run/ # Volatile runtime state (PID files, sockets)
├── boot/ # Static files for the bootloader (vmlinuz, initramfs)
├── home/ # User home directories
└── root/ # Root user's home directory
The Historical Origin of /bin vs. /usr/bin
Why did Unix-like systems historically have both /bin and /usr/bin, and /lib and /usr/lib?
In the early 1970s, Ken Thompson and Dennis Ritchie ran out of storage on their PDP-11’s first RK05 disk pack (which held only 1.5 megabytes). They added a second disk pack and mounted it at /usr. Essential commands needed to boot the system into single-user mode and repair filesystems (sh, mount, fsck) stayed in /bin on the primary disk. Everything else (cc, man, troff) moved to /usr.
For decades, this split persisted under the assumption that /usr might be mounted over NFS (Network File System) after the root partition booted.
The Modern “Usr-Merge”
In modern Linux distributions, the /bin vs. /usr/bin distinction is obsolete. Early boot tasks are handled by the initramfs, which mounts all required storage before root pivot occurs.
Consequently, modern distributions (Arch Linux, Fedora, Debian 12+, Ubuntu 20.04+) implement the Usr-Merge:
# On a modern Usr-Merged system:
$ ls -l /
lrwxrwxrwx 1 root root 7 bin -> usr/bin
lrwxrwxrwx 1 root root 7 sbin -> usr/bin
lrwxrwxrwx 1 root root 7 lib -> usr/lib
lrwxrwxrwx 1 root root 9 lib64 -> usr/lib64Advantages of the Usr-Merge
- Simplified
$PATH: Developers and scripts no longer have to worry whether a binary is located in/bin,/sbin,/usr/bin, or/usr/sbin. - Snapshotting and Immutable System Roots: The entire operating system binary state is contained within
/usr. This allows/usrto be mounted strictly read-only, verified viadm-verity, or updated atomically as an OSTree or Btrfs subvolume. - Clean Factory Resets: Because
/usrholds vendor-supplied defaults and/etcholds user overrides, resetting a machine to factory state can be as simple as wiping/etcand/var.