-
Notifications
You must be signed in to change notification settings - Fork 19
Linux File Hierarchy: Understanding the FHS for Unix‐like Systems
Mahesh Shukla edited this page Sep 2, 2025
·
2 revisions
The Linux File Hierarchy Structure (FHS) or Filesystem Hierarchy Standard defines the directory structure and contents in Unix-like OS.
It is maintained by the Linux Foundation.
- Primary hierarchy root of the filesystem.
- Every file/directory starts from
/
. - Only root user can write here.
-
/root
is the root user’s home directory (not the same as/
).
- Essential command binaries available for all users.
- Required in single-user mode for basic operations.
- Bootloader files: kernels, initrd, and boot config files.
- Device files like
/dev/null
, terminals, USB devices. - Interface between hardware and OS.
- Host-specific system-wide configuration files.
- Contains startup/shutdown scripts & program configs.
- Users’ home directories containing files & personal settings.
- Libraries essential for binaries in
/bin
and/sbin
.
- Mount points for removable media (CDs, USBs).
- Temporary mount points for filesystems.
- Optional or third-party software packages.
- System binaries used by admins for maintenance tasks.
- Site-specific data served by system (web, version control, etc.).
- Temporary files cleared on reboot.
- Secondary hierarchy for read-only user data.
- Contains utilities, apps, libraries, docs.
-
/usr/bin
: user binaries -
/usr/sbin
: admin binaries
- Virtual filesystem for processes & kernel info.
- Contains system resources & running process info.
- Temporary filesystem storing volatile runtime data (FHS v3.0+).
Understanding the Linux File Hierarchy Structure (FHS) is crucial for:
- Efficient navigation & management
- Finding essential files & configurations
- Working as a sysadmin, developer, or Linux enthusiast
Mastering FHS helps you work efficiently in Linux environments.
Happy exploring! 🚀