Skip to content
linux system-management

FHS (FHS)

fhs filesystem-hierarchy directories linux
Plain English

The FHS is the map of where things live on a Linux system. Configuration files go in one place, programs in another, logs in a third. Because most distributions follow the same map, once you learn it you know where to look on almost any Linux machine. It is the reason every Linux admin knows logs are under /var/log.

Technical Definition

The Filesystem Hierarchy Standard (FHS), maintained by the Linux Foundation (version 3.0), defines the layout of a Unix-like filesystem.

Key directories:

PathContents
/Root of the whole tree
/etcSystem configuration (text files)
/homeUser home directories
/rootRoot user’s home
/usr/bin, /usr/sbinPrograms installed by the package manager
/usr/localSoftware you installed by hand
/optSelf-contained third-party apps
/varData that changes: /var/log, /var/lib, /var/cache
/tmpTemporary files, cleared at reboot on many systems
/bootKernel, initramfs, GRUB files
/devDevice files (/dev/sda, /dev/null)
/proc, /sysVirtual files exposing kernel and hardware state
/mnt, /mediaMount points for temporary and removable media
/srvData served by this system (web, FTP)

Merged /usr: on modern Ubuntu, /bin, /sbin, and /lib are symlinks into /usr.

Rule of thumb: config in /etc, logs and state in /var, your own files in /home. Back up /etc and /home and you have most of what matters on a basic system.

Source: Filesystem Hierarchy Standard 3.0

Exploring the hierarchy

$ ls /
bin  boot  dev  etc  home  lib  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

# The official description of each directory on your system
$ man hier

# Merged /usr symlinks
$ ls -l /bin
lrwxrwxrwx 1 root root 7 Apr 20 2026 /bin -> usr/bin

# Which package owns a file?
$ dpkg -S /usr/bin/ls
coreutils: /usr/bin/ls
In the Wild

Knowing the FHS is what lets you walk onto an unfamiliar server and find its config, logs, and data in seconds. It also tells you where to put things: your scripts in /usr/local/bin, app data in /srv or /opt, never hand-edited files under /usr where the next package update will overwrite them. Disk-full alerts usually trace to /var (logs, caches, Docker images), which is why many servers give it its own partition.