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 Directory Purpose in the Linux Filesystem Hierarchy
/bin Essential command binaries needed for system repair and management.
/boot Files required for system booting, including GRUB and kernel files.
/cdrom Legacy mount point for CD-ROM media.
/devbootstrap Setup files used during initial installation processes.
/dev Device files representing hardware and virtual devices.
/etc System wide configuration files and shell scripts used during boot.
/home User directories and personal files.
/initrd.img Link to the initial RAM disk used at boot time.
/lib Essential shared libraries used by binaries in /bin and /sbin.
/lost+found Recovered files after filesystem errors.
/media Auto mount point for external drives like USBs and DVDs.
/mnt Temporary mount point used by system administrators.
/opt Optional third-party application software.
/proc Virtual filesystem providing process and kernel information.
/root Root user’s home directory.
/sbin System binaries used for booting, restoring, and repairing.
/srv Data for services provided by the system, like FTP or web servers.
/sys Interface to kernel devices and system info.
/tmp Temporary files, usually deleted on reboot.
/usr User system resources—apps, binaries, documentation, etc.
/var Variable files like logs, caches, and spool files.
/vmlinuz Link 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.