Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Filesystem Hierarchy Standard (FHS)

Direct answer

The Filesystem Hierarchy Standard (FHS) defines where things belong: /etc configuration, /var variable data and logs, /usr installed software, /home user data, /tmp temporary files, /opt add-on software, /boot kernel and bootloader files.

When to use this

Use it to know where to look for configuration, logs or programs, and where to put new files.

First 30 seconds

1. Configuration → /etc/<service>/.

2. Logs → /var/log/ or journalctl.

3. Program location → type -a <cmd>, package files → dpkg -L / rpm -ql.

4. Data → /var/lib/<service>/ or /srv/.

5. Which package owns a file → dpkg -S <path> / rpm -qf <path>.

Operational verification

file type (config, data, log, program) → FHS directory → package or admin ownership

Evidence · next step

For Filesystem → Filesystem Hierarchy Standard (FHS), continue with the first unproven Topic check: Map the path to its intended FHS role and record whether the host follows a merged-/usr or other distribution-specific layout. If that boundary is healthy, advance to the adjacent check: Verify the actual directory, symlink and mount topology instead of inferring it from the conventional pathname alone. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it to know where to look for configuration, logs or programs, and where to put new files.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

FHS role/convention → distribution policy/layout → actual directory or symlink → mount topology → package/local/runtime ownership → consumer path usage → observed result

Healthy evidence: the path role matches FHS intent and the host-specific symlink, package, mount and consumer evidence agree on the actual implementation.

Step 2 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Map the path to its intended FHS role and record whether the host follows a merged-/usr or other distribution-specific layout.

  • Verify the actual directory, symlink and mount topology instead of inferring it from the conventional pathname alone.
  • Trace package-owned versus locally administered versus runtime-generated content separately.
  • Use the consuming service/package documentation when FHS permits implementation-specific placement.

Verification chain. FHS role/convention → distribution policy/layout → actual directory or symlink → mount topology → package/local/runtime ownership → consumer path usage → observed result

Step 3 Commands Verify boundary
man hier
ls /
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: a conventional path is assumed to exist or be a separate filesystem, merged-/usr symlinks are treated as corruption, or application placement is inferred without checking package/runtime ownership.

Step 5 Common mistakes Narrow the fault
  • Installing local software into /usr instead of /usr/local or /opt.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

Put configuration in /etc, data in /var or /srv, local software in /usr/local or /opt — never edit files under /usr that packages own, they are overwritten on update. Many distributions merge /bin into /usr/bin.

Key checks
  • dpkg -S <path> — which Debian package owns a file
  • rpm -qf <path> — which RPM owns a file
  • ls -ld <path> — owner, permissions and type
  • stat <path> — inode, links, size and timestamps
  • df -h <path> — filesystem and free space
  • findmnt <path> — which mount the path is on
ReferenceWhat it is1 section · depth on demand

Core model

Classify a path by FHS role, then verify the distribution-specific implementation and actual mount/layout. Use FHS as an ownership and placement convention, not as evidence that a directory exists, is separately mounted, is writable, or contains exactly one class of data on the current system.

ReferenceImportant terms & boundaries6 sections · depth on demand

What this shows and what it does not

FHS establishes naming and placement semantics, not the current mount topology, permissions, package ownership, runtime state or health of the content stored there.

In depth

The Filesystem Hierarchy Standard and Linux reality

The Filesystem Hierarchy Standard (FHS) defines where files belong on Unix-like systems. Linux distributions follow it closely, and the hier(7) manual page describes the resulting layout as it's used on Linux. Two ideas behind the standard explain most of its choices:

Static (changes only through updates)Variable (changes during operation)
Shareable (can be the same on many hosts)/usr, /opt/var/mail, /srv (often)
Not shareable (specific to this host)/etc, /boot/var/log, /var/run → /run, /var/lib

Static data can be mounted read-only, and variable data needs writable storage and backups.

Main directories (hier(7))

DirectoryPurpose
/usr/binThe primary directory for executable programs
/usr/sbinSystem administration programs not needed for booting
/usr/libLibraries, plus some executables not run directly
/usr/shareArchitecture-independent data
/usr/localPrograms installed locally, outside the package manager
/optAdd-on packages with static files
/var/cacheCached data for programs
/var/libVariable state information
/var/logLog files
/var/spoolQueued files (print, mail, cron)

How modern distributions differ from older layouts

ChangeEffect
Merged /usr/bin, /sbin and /lib are symlinks into /usr
/run (tmpfs)Replaces /var/run and /var/lock, which are now symlinks
systemd-tmpfilesCreates and cleans /run, /tmp and /var/tmp entries
host$ ls -ld /bin /sbin /lib /var/run
lrwxrwxrwx 1 root root  7 Apr 22  2026 /bin -> usr/bin
lrwxrwxrwx 1 root root  8 Apr 22  2026 /sbin -> usr/sbin
lrwxrwxrwx 1 root root  7 Apr 22  2026 /lib -> usr/lib
lrwxrwxrwx 1 root root  4 Apr 22  2026 /var/run -> /run
host$ man 7 hier | grep -A2 '^ *\/srv'
host$ systemd-path system-state-private system-cache

Placing your own software

Software installed outside the package manager goes into /usr/local (for traditional builds) or /opt/<name>. Its configuration goes into /etc (or /etc/opt/<name>), and its data into /var/lib/<name>. Following that keeps package upgrades from overwriting your files, and keeps backups simple.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Platform, version and operating-envelope scope

Most distributions follow the FHS, but details differ: many have merged /bin and /sbin into /usr (usr-merge), and distributions differ in where they put service data and configuration snippets.

How it works at runtime

Filesystem Hierarchy Standard (FHS) is part of Filesystem → Filesystem Hierarchy Standard (FHS). Filesystem Hierarchy Standard (FHS) defines conventional purposes for major Unix/Linux directory trees so software and administrators can reason about shareable versus host-specific, static versus variable and essential versus optional content without assuming every distribution implements every convention identically.

Topic-specific state model. Filesystem Hierarchy Standard (FHS) defines conventional purposes for major Unix/Linux directory trees so software and administrators can reason about shareable versus host-specific, static versus variable and essential versus optional content without assuming every distribution implements every convention identically.

Interpretation rule. - FHS convention ≠ mandatory identical layout on every Linux distribution or appliance.

  • Directory purpose ≠ mount boundary; /usr, /var, /home and others may share or use separate filesystems.
  • Merged-/usr layouts can make traditional /bin, /sbin or /lib paths symlinks without changing the logical role.
  • A package following FHS placement ≠ all application state is confined to one directory tree.

Quick reference

The Filesystem Hierarchy Standard (FHS 3.0) defines where things live. Modern distributions merged /bin, /sbin, /lib into /usr ("usrmerge": /bin → /usr/bin symlink).

DirectoryContents
/usr/bin, /usr/sbinPrograms from packages
/usr/localLocally built software
/optSelf-contained third-party apps
/etcHost configuration
/var/libApplication state (databases, package DBs)
/var/logLogs
/srvData served by this host
/runRuntime data since boot (PID files, sockets)

Putting data in the right place matters for backups, separate mount points and SELinux default labels.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. FHS establishes naming and placement semantics, not the current mount topology, permissions, package ownership, runtime state or health of the content stored there.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. FHS owns directory-purpose conventions. Distribution/package management, mount layout, permissions and application-specific placement remain in the relevant Topics.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in Filesystem → Filesystem Hierarchy Standard (FHS). Documentation verification only; this is not observed lab or production Evidence.

Basis: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
FHS linuxfilesystem hierarchy standardlinux directory standardlinux hierarchy convention
Embedded reference data

Quick lookup tables

Filesystem Hierarchy Standard (FHS) operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Filesystem Hierarchy Standard (FHS).

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateFilesystem Hierarchy Standard (FHS) defines conventional purposes for major Unix/Linux directory trees so software and administrators can reason about shareable versus host-specific, static versus variable and essential versus optional content without assuming every distribution implements every convention identically.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin process/container mount namespace → resolve the exact path from / and record every mount crossing → identify final dentry + filesystem/device + inode + file type → capture ownership/mode/ACL and capacity where relevant → map pseudo/device/runtime objects to the live kernel/process endpoint → verify the original consumer read/write/execute/service result.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainFHS role/convention → distribution policy/layout → actual directory or symlink → mount topology → package/local/runtime ownership → consumer path usage → observed resultTrace requested/configured state through effective state to the observed workload result.
Failure boundaryFHS establishes naming and placement semantics, not the current mount topology, permissions, package ownership, runtime state or health of the content stored there.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated namespace, path and object evidence can establish this Linux Filesystem proof path: FHS role/convention → distribution policy/layout → actual directory or symlink → mount topology → package/local/runtime ownership → consumer path usage → observed resultUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured namespace, mount, inode/object, authorization, backing-resource or consumer scope. FHS establishes naming and placement semantics, not the current mount topology, permissions, package ownership, runtime state or health of the content stored there.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven boundary: preserve the same process mount namespace, resolve the path and mount crossings, identify the exact object/inode or live pseudo/device endpoint, inspect effective access/capacity, then repeat the original consumer operation before changing unrelated filesystem state.Continue to the next unresolved boundary while preserving the original test condition.

Filesystem Hierarchy Standard (FHS) · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryFilesystem Hierarchy Standard (FHS)
Topic pathFilesystem → Filesystem Hierarchy Standard (FHS)
Runtime stateFilesystem Hierarchy Standard (FHS) defines conventional purposes for major Unix/Linux directory trees so software and administrators can reason about shareable versus host-specific, static versus variable and essential versus optional content without assuming every distribution implements every convention identically.
Fast checks- Map the path to its intended FHS role and record whether the host follows a merged-/usr or other distribution-specific layout. - Verify the actual directory, symlink and mount topology instead of inferring it from the conventional pathname alone. - Trace package-owned versus locally administered versus runtime-generated content separately. - Use the consuming service/package documentation when FHS permits implementation-specific placement.
Verification chainFHS role/convention → distribution policy/layout → actual directory or symlink → mount topology → package/local/runtime ownership → consumer path usage → observed result Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundaryFHS establishes naming and placement semantics, not the current mount topology, permissions, package ownership, runtime state or health of the content stored there. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?