File System Hierarchy for Linux OS
A quick reference describing the general file system hierarchy of a Linux system — what each top-level directory under root is for.
⚠️ Note: I couldn’t recover the original publish date for this post from the source page, so
pubDateabove is a placeholder — swap in the actual date before publishing.
✔️ Describe the general file system hierarchy of a Linux system
Every Linux system is organized as a single tree, starting from one directory: /, the root. All other directories — whether they live on the same disk, a different partition, or removable media — are mounted somewhere underneath this one root, giving Linux a single, unified namespace instead of separate drive letters like Windows.
Linux file system
/
│
┌───────┬───────┬───────┬─────┼─────┬───────┬───────┬───────┐
/bin /boot /dev /etc /lib /media /mnt /opt /home
│
┌─────────┬──┴───┬────────┬───────┬───────┐
/root /proc /sys /tmp /usr /var
│
/srv
│
/run
(Diagram: the original reference image for this hierarchy is included alongside this file at assets/linux-file-system-hierarchy.png.)
The Root Directory — /
The top-level directory is the root filesystem, and it contains all of the files required to boot the operating system before any other filesystems are available. After boot (/ root), every other filesystem gets mounted at its standard location underneath it.
The Directories, One by One
| Directory | Purpose |
|---|---|
/etc | Configuration files for installed applications. |
/bin | Binaries — contains essential command binaries needed for basic system operation. |
/sbin | Executables used for system administration (binary system files). |
/boot | Files required to boot the Linux OS, including the kernel executable (static bootloader). |
/dev | Device files — facilitates access to every hardware device attached to the system. |
/lib | Essential shared libraries and kernel modules. |
/usr | The secondary hierarchy — houses the bulk of user-facing programs, libraries, and documentation. |
/mnt | Temporary mount point for regular filesystems. |
/media | Mounting point for removable media. |
/opt | Optional files, such as third-party tools. |
/tmp | Temporary files. |
/var | Variable data. |
/root | The root user’s home folder. |
/home | Home folders for regular users. |
/srv | Data for services provided by the system. |
/proc | Virtual filesystem exposing process and kernel information. |
/sys | Virtual filesystem exposing hardware and driver information. |
/run | Storage for runtime information generated since the last boot. |
Why This Matters
Once you internalize this layout, a Linux system stops feeling arbitrary. Configuration always lives in /etc, logs and variable data always live under /var, temporary files always land in /tmp, and every user’s personal space sits under /home. That consistency is exactly why the same mental model transfers across distributions — Ubuntu, Fedora, Debian, or anything else — once you know one, you effectively know them all.