Use it to find installed programs and libraries, or decide where to install local software.
/usr
/usr holds installed, read-only software: /usr/bin programs, /usr/lib libraries, /usr/share data and documentation, and /usr/local for software installed by the admin.
1. ls -ld /usr and findmnt /usr — present and mounted where expected?
2. df -h /usr — space left? df -i /usr — inodes left?
3. Find large or unexpected content: du -xh --max-depth=1 /usr | sort -h | tail.
4. Permissions and owner as the FHS and services expect?
5. Fix space, permissions or mount, then retest the service.
/usr mounted (or virtual) → correct owner and permissions → enough space → services read and write as intended
For Filesystem → /usr, continue with the first unproven Topic check: Determine merged-/usr layout and actual symlink/mount topology. If that boundary is healthy, advance to the adjacent check: Identify package ownership versus /usr/local administrator-owned content. 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
package/local install source → /usr or /usr/local path → symlink/mount layout → PATH/loader resolution → process launch → workload result
Healthy evidence: package/local ownership and merged-/usr topology are known, the process resolves the intended executable/libraries and the workload succeeds.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Determine merged-/usr layout and actual symlink/mount topology.
- Identify package ownership versus /usr/local administrator-owned content.
- Resolve the exact executable/library used by the affected process.
- Verify service/command behavior after package or local-software changes rather than relying on file presence.
Verification chain. package/local install source → /usr or /usr/local path → symlink/mount layout → PATH/loader resolution → process launch → workload result
Step 3 Commands Verify boundary
ls /usr/bin | wc -l
ls -l /bin # symlink to usr/bin on merged-/usr systems
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: /usr is mistaken for user homes, merged-/usr links are repaired destructively, or /usr/local overrides a package binary unexpectedly.
/usr content shows file placement and ownership context, not command selection, dependency resolution or successful execution.
Step 5 Common mistakes Narrow the fault
- Manually placing files in
/usrmanaged by packages.
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.
Files under /usr (except /usr/local) belong to packages; changes are overwritten by updates. Install your own software in /usr/local or /opt.
ls -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
Identify distribution-managed versus local content, merged-/usr symlink layout, executable/library resolution and whether /usr is separately mounted. Keep package ownership and runtime resolution separate: a binary existing under /usr does not show PATH selects it or its libraries/runtime are available.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
/usr content shows file placement and ownership context, not command selection, dependency resolution or successful execution.
In depth
/usr: programs, libraries and shared data
/usr holds the operating system's programs and libraries, mostly installed and managed by the package manager. The hier(7) manual page describes its main subdirectories:
/usr/bin, the primary directory for executable programs;/usr/sbin, for administration programs not needed for booting;/usr/lib, for libraries and some internal executables;/usr/share, for architecture-independent data;/usr/local, for programs installed locally.
With merged /usr, the top-level /bin, /sbin and /lib are just symlinks into /usr.
Subdirectories
| Path | Content |
|---|---|
/usr/bin | User and system commands |
/usr/sbin | Administration commands |
/usr/lib, /usr/lib64 | Libraries; also packaged unit files (/usr/lib/systemd/system) |
/usr/libexec | Internal helper programs (RHEL family) |
/usr/share | Documentation, man pages, locale data, icons |
/usr/include | C headers (development packages) |
/usr/src | Kernel and other sources or headers |
/usr/local/{bin,lib,share,etc} | Locally built software, not touched by packages |
Rules of thumb
| Rule | Reason |
|---|---|
Never edit files under /usr/lib or /usr/share by hand | Package upgrades overwrite them; override in /etc |
Install self-built software into /usr/local | Keeps it separate from package files |
/usr can be read-only | Immutable and image-based systems mount it that way |
PATH order
/usr/local/bin usually comes before /usr/bin in PATH. That lets a locally built version override the packaged one, which is deliberate but can be confusing.
host$ echo $PATH | tr : '\n'
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
host$ type -a python3
python3 is /usr/local/bin/python3
python3 is /usr/bin/python3
host$ ls -l /usr/local/bin/python3
host$ dpkg -S /usr/bin/python3 && dpkg -S /usr/local/bin/python3
python3-minimal: /usr/bin/python3
dpkg-query: no path found matching pattern /usr/local/bin/python3
host$ sudo debsums -s 2>&1 | head
host$ rpm -Va | grep -E '^..5' | head
Reading the example
A self-built python3 in /usr/local/bin shadows the packaged one, because it comes first in PATH. dpkg -S confirms that no package owns it. debsums -s (Debian) and rpm -Va (RHEL) report packaged files whose contents changed, which can reveal tampering or manual edits in /usr.
Documented example, not captured output.
How it works at runtime
/usr is part of Filesystem → /usr. /usr contains most distribution-managed user-space programs, libraries and shareable read-only-ish data, with /usr/local reserved for locally installed software; many modern distributions use merged-/usr where /bin, /sbin and /lib paths are symlinks into /usr.
Topic-specific state model. /usr contains most distribution-managed user-space programs, libraries and shareable read-only-ish data, with /usr/local reserved for locally installed software; many modern distributions use merged-/usr where /bin, /sbin and /lib paths are symlinks into /usr.
Interpretation rule. - /usr ≠ user home directories; that role belongs conventionally to /home.
- Merged-/usr symlinks such as /bin → /usr/bin ≠ filesystem corruption.
- File in /usr/bin ≠ command name resolves to that exact executable in every context.
- /usr/local content ≠ distribution package ownership and may override packaged executables through PATH precedence.
Quick reference
/usr holds the read-only, shareable part of the system: programs (/usr/bin), libraries (/usr/lib, /usr/lib64), documentation (/usr/share/doc, man pages), and since usrmerge also everything that used to be in /bin, /sbin, /lib.
ls -ld /bin /sbin /lib # symlinks into /usr on modern systems
rpm -qf /usr/bin/ssh; dpkg -S /usr/bin/ssh
/usr/local is for locally installed software and is searched before /usr in the default PATH — a locally built binary there silently overrides the packaged one.
Limits and how it fails
Primary failure point. /usr content shows file placement and ownership context, not command selection, dependency resolution or successful execution.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. /usr owns shared/static user-space hierarchy semantics. Package Management, PATH, dynamic linking and application branches own installation/resolution behavior.
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 → /usr. 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
/usr operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for /usr.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | /usr contains most distribution-managed user-space programs, libraries and shareable read-only-ish data, with /usr/local reserved for locally installed software; many modern distributions use merged-/usr where /bin, /sbin and /lib paths are symlinks into /usr. | 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 | package/local install source → /usr or /usr/local path → symlink/mount layout → PATH/loader resolution → process launch → workload result | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | /usr content proves file placement and ownership context, not command selection, dependency resolution or successful execution. | 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: package/local install source → /usr or /usr/local path → symlink/mount layout → PATH/loader resolution → process launch → workload 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. /usr content proves file placement and ownership context, not command selection, dependency resolution or successful execution. | 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. |
/usr · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | /usr |
|---|---|
| Topic path | Filesystem → /usr |
| Runtime state | /usr contains most distribution-managed user-space programs, libraries and shareable read-only-ish data, with /usr/local reserved for locally installed software; many modern distributions use merged-/usr where /bin, /sbin and /lib paths are symlinks into /usr. |
| Fast checks | - Determine merged-/usr layout and actual symlink/mount topology. - Identify package ownership versus /usr/local administrator-owned content. - Resolve the exact executable/library used by the affected process. - Verify service/command behavior after package or local-software changes rather than relying on file presence. |
| Verification chain | package/local install source → /usr or /usr/local path → symlink/mount layout → PATH/loader resolution → process launch → workload 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 | /usr content proves file placement and ownership context, not command selection, dependency resolution or successful execution. 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. |