File System Hierarchy (FHS)
Unlike Windows, which uses drive letters (C:, D:, etc.), Linux uses a single hierarchical directory structure starting from the "Root" directory (/).
The Directory Tree
The Linux file system is organized like an upside-down tree.
Exhaustive Directory Reference
| Directory | Full Name | Primary Purpose |
|---|---|---|
/bin | Binaries | Essential command binaries for all users (e.g., ls, cp). |
/sbin | System Binaries | Essential system binaries reserved for the admin (e.g., fdisk). |
/etc | Editable Text Configuration | System-wide configuration files (e.g., /etc/passwd). |
/lib | Libraries | Shared libraries required by binaries in /bin and /sbin. |
/home | Home | Personal directories for regular users. |
/root | Root Home | The home directory for the superuser (admin). |
/dev | Devices | Special files representing hardware devices. |
/var | Variable Data | Data that changes frequently, like logs (/var/log). |
/tmp | Temporary | Temporary files, often cleared on every reboot. |
/usr | User Utilities | Secondary hierarchy for user-specific tools and libraries. |
/opt | Optional | Where third-party software packages are installed. |
/proc | Processes | Virtual file system providing info about running processes. |
/mnt | Mount | Temporary mount points for external file systems. |
/media | Media | Mount points for removable media (CD-ROMs, USBs). |
/boot | Boot | Static files required to boot the system. |
/sys | System | Virtual file system for hardware and kernel information. |
[!IMPORTANT] "Everything is a file" In Linux, even hardware devices and running processes are presented to the user as files within this hierarchy. This unified approach is what makes Linux so flexible for automation.