Skip to content

Linux File Hierarchy: Understanding the FHS for Unix‐like Systems

Mahesh Shukla edited this page Sep 2, 2025 · 2 revisions

🗂 Linux File Hierarchy Structure (FHS)

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.


🏠 / (Root)

  • 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 /).

Root Directory


📦 /bin

  • Essential command binaries available for all users.
  • Required in single-user mode for basic operations.

Bin Directory


🔧 /boot

  • Bootloader files: kernels, initrd, and boot config files.

Boot Directory


💻 /dev

  • Device files like /dev/null, terminals, USB devices.
  • Interface between hardware and OS.

Dev Directory


⚙️ /etc

  • Host-specific system-wide configuration files.
  • Contains startup/shutdown scripts & program configs.

Etc Directory


🏡 /home

  • Users’ home directories containing files & personal settings.

Home Directory


📚 /lib

  • Libraries essential for binaries in /bin and /sbin.

Lib Directory


💿 /media

  • Mount points for removable media (CDs, USBs).

Media Directory


🗄 /mnt

  • Temporary mount points for filesystems.

Mnt Directory


🧩 /opt

  • Optional or third-party software packages.

Opt Directory


🛠 /sbin

  • System binaries used by admins for maintenance tasks.

Sbin Directory


🌐 /srv

  • Site-specific data served by system (web, version control, etc.).

Srv Directory


🕒 /tmp

  • Temporary files cleared on reboot.

Tmp Directory


🖥 /usr

  • Secondary hierarchy for read-only user data.
  • Contains utilities, apps, libraries, docs.
  • /usr/bin: user binaries
  • /usr/sbin: admin binaries

Usr Directory


📄 /proc

  • Virtual filesystem for processes & kernel info.
  • Contains system resources & running process info.

Proc Directory


⚡ /run

  • Temporary filesystem storing volatile runtime data (FHS v3.0+).

✅ Conclusion

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! 🚀


📚 References

  1. Filesystem Hierarchy Standard (FHS)
  2. Linux Filesystem Hierarchy
  3. Understanding the Linux Directory Structure
  4. Linux Documentation
Clone this wiki locally