The Linux file system is organized as a single inverted tree rooted at /, the root directory. Unlike operating systems that assign separate drive letters to storage volumes, Linux mounts everything under this unified hierarchy, making paths consistent and predictable across all distributions.
The Filesystem Hierarchy Standard (FHS) defines where specific types of files belong. Understanding these locations is essential before performing any administrative task. Key directories include:
/bincontains essential user command binaries needed during boot and single-user mode, such asls,cp, andbash./etcholds system-wide configuration files. Every service you configure will have at least one file here./homestores personal directories for non-root users. A user namedalexwould have a home directory at/home/alex./varcontains variable data that changes during system operation, including logs under/var/logand mail spools under/var/mail./tmpholds temporary files cleared on reboot. Do not store persistent data here./procand/sysare virtual file systems exposing kernel and hardware information as readable files. They exist only in memory, not on disk./usrcontains the bulk of user-space programs and libraries, organized into subdirectories such as/usr/bin,/usr/lib, and/usr/share./bootholds the kernel image and bootloader configuration files./devcontains device files representing hardware components. For example,/dev/sdarepresents the first SATA disk.
Absolute paths always begin with / and describe the full location from the root. Relative paths describe a location relative to the current working directory and never start with /. Knowing the difference prevents common errors when writing scripts or configuring services.
A system administrator at a mid-size SaaS firm needs to find the configuration file for a web server. Knowing that service configuration files live under /etc, the administrator checks /etc/nginx/nginx.conf directly rather than searching blindly. When diagnosing a disk space alert, the administrator checks /var/log for oversized log files, because the FHS dictates that logs belong there. This structural knowledge makes every administrative action faster and more predictable.
- Linux uses a single unified directory tree rooted at
/. - The FHS defines the purpose of each top-level directory.
/etcholds configuration files;/varholds variable runtime data;/procand/sysexpose kernel information.- Absolute paths start with
/; relative paths do not. - Knowing the hierarchy accelerates troubleshooting and administration tasks.