Back to course

10. Understanding the Filesystem Hierarchy Standard (FHS)

Linux Basics: From Zero to CLI Hero

The Linux Directory Structure

Unlike Windows, which uses drive letters (C:, D:), Linux uses a unified directory structure starting from a single root directory (/). This structure is standardized by the FHS.

Key Directories to Memorize

DirectoryPurpose
/The Root directory. All files and directories start here.
/homeContains personal directories for all non-root users (e.g., /home/john).
/rootThe home directory for the special administrative user (root).
/binEssential user binaries (executable programs like ls, cat).
/sbinEssential system binaries (administrative programs like fdisk).
/etcSystem-wide configuration files (e.g., networking, users, passwords).
/varVariable data, often temporary, like system logs (/var/log).
/tmpTemporary files that can be deleted upon reboot.
/usrSecondary hierarchy for user programs, libraries, documentation (largest section).
/mnt, /mediaMount points for temporary filesystems (USB drives, CD-ROMs).

Key Takeaway: Everything in Linux starts at /.