Linux Professional Institute LPIC-1 Exam 101

Devices Linux Filesystems Filesystem Hierarchy Standard

Find System Files and Place Files in the Correct Location Part 1 FHS

Introduction

The Filesystem Hierarchy Standard (FHS) defines a common directory layout and its contents for Unix-like operating systems. Maintained by the Linux Foundation and detailed in the FHS 3.0 specification, this standard ensures that users and administrators can predict where to find system files, binaries, and configuration data. While FHS compliance is not mandatory, most Linux distributions follow it closely.

Note

FHS compliance guarantees a consistent directory layout, simplifying system administration, backups, and package management.

Top-Level Directory Overview

PathPurposeCommon Contents / Examples
/Root of the filesystem hierarchyEverything lives under /
/binEssential command binaries available to all usersls, cp, mv
/bootStatic files for the bootloaderKernel images (vmlinuz), initrd
/devDevice nodes for hardware & virtual devices/dev/sda, /dev/null
/etcHost-specific configuration filesfstab, hosts, service configs
/homeUser home directories/home/alice, /home/bob
/libShared libraries needed by /bin and /sbinlibc.so.6, kernel modules
/mediaMount points for removable media (USB, CD/DVD)/media/usb, /media/cdrom
/mntTemporary mount points for administrators/mnt/shared
/optOptional or third-party software packages/opt/google, /opt/mysql
/rootSuperuser’s home directory/root/.bashrc, /root/.ssh/
/runRuntime data (PID files, sockets)/run/docker, /run/sshd.pid
/sbinSystem binaries for booting & maintenancefsck, ip, iptables
/srvData served by system services/srv/www/, /srv/ftp/
/tmpTemporary files cleared at reboot/tmp/session_12345
/usrSecondary hierarchy for read-only user applications/usr/bin, /usr/lib, /usr/share
/procVirtual filesystem for process & kernel information/proc/cpuinfo, /proc/<pid>/
/varVariable data files (logs, spools, caches)/var/log, /var/spool/mail
/var/tmpTemporary files preserved between reboots/var/tmp/install_cache

The image displays a list of directories from the Filesystem Hierarchy Standard, commonly used in Unix-like operating systems.

Summary Tree

/
├── bin
├── boot
├── dev
├── etc
├── home
├── lib
├── media
├── mnt
├── opt
├── root
├── run
├── sbin
├── srv
├── tmp
├── usr
├── proc
└── var
    └── tmp

Further Reading

Ready to test your understanding? Proceed to the quiz section!

Watch Video

Watch video content

Previous
Create and Change Soft Links