Linux File System Hierarchy: Directory Structure

Linux File System Hierarchy: Understanding the Linux directory structure is one of the most important first steps after migrating from Windows to Linux. Unlike Windows, Linux uses a unique, standardized file system layout. One of the first things new Linux users should learn is how the Linux filesystem hierarchy works. Getting familiar with this structure early on will help you confidently navigate, manage, and troubleshoot your Linux system.

Linux File System Directory Structure

linux filesystem directory structure
Watch: Linux File System Hierarchy - Navigating the Linux Directory Structure

 

What is the File System Hierarchy Standard (FHS)?

The Filesystem Hierarchy Standard (FHS) is a specification that outlines the directory structure and content in Linux and other Unix-like operating systems. This standard was designed to maintain consistency across distributions, making it easier for users and system administrators to understand and locate system files and directories.

Whether you're using Ubuntu, Debian, Fedora, or Arch Linux, understanding the FHS helps you work efficiently and ensures cross-compatibility between Linux distributions.

Understanding the Linux Filesystem Directory Structure

Here’s a breakdown of the core Linux directories defined by the FHS and what they’re used for:

Linux DirectoryPurpose in the Linux Filesystem Hierarchy
/binEssential command binaries needed for system repair and management.
/bootFiles required for system booting, including GRUB and kernel files.
/cdromLegacy mount point for CD-ROM media.
/devbootstrapSetup files used during initial installation processes.
/devDevice files representing hardware and virtual devices.
/etcSystem wide configuration files and shell scripts used during boot.
/homeUser directories and personal files.
/initrd.imgLink to the initial RAM disk used at boot time.
/libEssential shared libraries used by binaries in /bin and /sbin.
/lost+foundRecovered files after filesystem errors.
/mediaAuto mount point for external drives like USBs and DVDs.
/mntTemporary mount point used by system administrators.
/optOptional third-party application software.
/procVirtual filesystem providing process and kernel information.
/rootRoot user’s home directory.
/sbinSystem binaries used for booting, restoring, and repairing.
/srvData for services provided by the system, like FTP or web servers.
/sysInterface to kernel devices and system info.
/tmpTemporary files, usually deleted on reboot.
/usrUser system resources—apps, binaries, documentation, etc.
/varVariable files like logs, caches, and spool files.
/vmlinuzLink to the compressed Linux kernel image used for booting.

Mastering the Linux file system layout gives you the confidence to explore and troubleshoot Linux systems efficiently. While this guide highlights essential directories, deeper knowledge will come with hands on experience as you continue using Linux.

Further Reading and Related Guides