Use it to know where to look for configuration, logs or programs, and where to put new files.
Filesystem Hierarchy Standard (FHS)
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.
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>.
file type (config, data, log, program) → FHS directory → package or admin ownership
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
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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
/usrinstead of/usr/localor/opt.
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.
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.
dpkg -S <path>— which Debian package owns a filerpm -qf <path>— which RPM owns a filels -ld <path>— owner, permissions and typestat <path>— inode, links, size and timestampsdf -h <path>— filesystem and free spacefindmnt <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))
| Directory | Purpose |
|---|---|
/usr/bin | The primary directory for executable programs |
/usr/sbin | System administration programs not needed for booting |
/usr/lib | Libraries, plus some executables not run directly |
/usr/share | Architecture-independent data |
/usr/local | Programs installed locally, outside the package manager |
/opt | Add-on packages with static files |
/var/cache | Cached data for programs |
/var/lib | Variable state information |
/var/log | Log files |
/var/spool | Queued files (print, mail, cron) |
How modern distributions differ from older layouts
| Change | Effect |
|---|---|
| Merged /usr | /bin, /sbin and /lib are symlinks into /usr |
/run (tmpfs) | Replaces /var/run and /var/lock, which are now symlinks |
| systemd-tmpfiles | Creates 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.
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).
| Directory | Contents |
|---|---|
/usr/bin, /usr/sbin | Programs from packages |
/usr/local | Locally built software |
/opt | Self-contained third-party apps |
/etc | Host configuration |
/var/lib | Application state (databases, package DBs) |
/var/log | Logs |
/srv | Data served by this host |
/run | Runtime data since boot (PID files, sockets) |
Putting data in the right place matters for backups, separate mount points and SELinux default labels.
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%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.
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.
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 boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | 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. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin 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 chain | FHS role/convention → distribution policy/layout → actual directory or symlink → mount topology → package/local/runtime ownership → consumer path usage → observed result | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | FHS 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 evidence | Correlated 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 result | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It 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 check | Continue 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 boundary | Filesystem Hierarchy Standard (FHS) |
|---|---|
| Topic path | Filesystem → Filesystem Hierarchy Standard (FHS) |
| Runtime state | 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. |
| 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 chain | FHS 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 boundary | FHS 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 rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |