Jonathan Love

Search IconIcon to open search

Filesystem Hierarchy Standard

The Filesystem Hierarchy Standard outlines the conventional layout of UNIX systems and is largely adhered to by BSD and Linux (and macOS for the core userland ), though the specification only officially holds for Linux

https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

In particular, it establishes:

PathPurpose
/Root directory of the system
/binCritical command binaries needed to use the system
/bootBootloader files (typically GRUB)
/devDev files (commonly from udev)
/etcSystem-wide configuration files
/homeUser directories
/libEssential libraries for /bin binaries
/mediaRemovable filesystems
/mntMounted, non-removable filesystems
/optMiscellaneous software
/procThe virtual procfs
/rootHome directory for the root user
/runRuntime info, often a tmpfs
/sbinCritical binaries needed to start the system (e.g. the Init System)
/srvData served by the system
/sysThe virtual sysfs
/tmpTemporary files. May be a tmpfs
/usrRead-only user data (e.g. icons, libraries, non-critical userland binaries)
/varVariable files, such as logs, mail and print spools, caches, databases

In the last few years, there is some talk of consolidation between /bin -> /usr/bin and /sbin/ -> /usr/sbin (and, in some cases, all of them just going to /usr/bin)

Not all conventions are held fast - e.g. web servers often use /var/www over /srv, and miscellaneous software often uses /usr/local instead of /opt


Interactive Graph