The Filesystem Hierarchy
Filesystem Hierarchy Standard (FHS)
You met a handful of these directories briefly in the Foundations track. Here's the fuller map - every mainstream Linux distro follows the same Filesystem Hierarchy Standard (FHS), which is exactly why the same muscle memory works whether you're on Ubuntu, Debian, or RHEL.
| Path | Purpose |
|---|---|
/ | Root of everything |
/bin, /sbin | Essential (system) binaries |
/etc | System configuration |
/home | User home directories |
/var | Variable data - logs, spool, caches |
/tmp | Temporary files (often cleared on boot) |
/usr | User programs & libraries |
/opt | Optional/3rd-party software |
/proc, /sys | Virtual kernel filesystems |
/dev | Device files |
/boot | Kernel + bootloader |
/mnt, /media | Mount points for removable/temp media |
A useful way to group these: /etc, /bin, /boot hold things that rarely change once the system is installed. /var and /tmp are the opposite - /var literally stands for "variable," meaning its contents (logs, mail queues, caches) are expected to keep growing and changing for the system's entire lifetime, which is exactly why disk-usage incidents so often trace back there.
Tip: When something is misbehaving, two facts solve a surprising share of real incidents before you even open a debugger: its configuration is almost certainly in/etc, and its logs are almost certainly in/var/log. Get in the habit of checking those two locations first, by reflex, before searching further.