Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Filesystem

Direct answer

The Linux filesystem is a single tree starting at /. Disks, partitions and virtual filesystems are mounted onto directories in that tree; everything — files, devices, sockets — is reached through paths.

When to use this

Use it as the entry point for questions about where files live, which disk a path is on, or why a path is missing.

First 30 seconds

1. findmnt <path> — which filesystem holds it?

2. df -h <path> — free space? df -i — free inodes?

3. ls -ld <path> — exists, owner, permissions?

4. Read-only? findmnt -no OPTIONS <path>.

5. Then go to the specific topic (permissions, mount, disk).

Operational verification

path → mount point → filesystem → inode → data

Evidence · next step

For Filesystem, continue with the first unproven Topic check: Capture the exact process/container mount namespace and pathname before reasoning about what / refers to. If that boundary is healthy, advance to the adjacent check: Identify mount crossings, final object type, inode/metadata and whether the path is local, virtual, networked or bind-mounted. 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
Key commanddf -hT
Scope / prerequisiteUse it as the entry point for questions about where files live, which disk a path is on, or why a path is missing.
What next?3 suggested next steps
Child topics (this level)19
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

process mount namespace → pathname components → mount crossing/backing filesystem → dentry/name lookup → inode/object metadata → file type + ownership/mode/ACL → data/device/pseudo-file operation → consumer-visible result

Healthy evidence: the exact namespace, mount crossing, final inode/object type and consumer operation all refer to the intended backing object and produce the expected result.

Step 2 Verification and output interpretation Verify boundary

Verification path. Verify the exact path in the same mount namespace as the consumer. Use stat-style inode/type/ownership data, mount information, link resolution and filesystem-specific status rather than relying on ls output alone. For capacity or write failures, separate bytes, inodes, quotas, read-only state and backing-device health. For a changed file, confirm the consumer reopened/reloaded it when required; an already-open descriptor can continue referencing the previous inode after rename or replacement.

Existing fast checks for this Topic. - Capture the exact process/container mount namespace and pathname before reasoning about what / refers to.

  • Identify mount crossings, final object type, inode/metadata and whether the path is local, virtual, networked or bind-mounted.
  • Separate path lookup from ownership/mode/ACL, free-space/inode capacity and lower storage health.
  • Verify the original consumer read/write/execute behavior after proving the namespace and object identity.

Verification chain. process mount namespace → pathname components → mount crossing/backing filesystem → dentry/name lookup → inode/object metadata → file type + ownership/mode/ACL → data/device/pseudo-file operation → consumer-visible result

Step 3 Commands Verify boundary
ls -la /
df -hT
stat /etc/hosts
du -sh /var/* | sort -h
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: a path is assumed to be on one filesystem, / is confused with /root, mount absence exposes stale underlying data, or metadata presence is treated as evidence of workload success.

It does not show behavior outside the captured namespace, mount, inode/object, authorization, backing-resource or consumer scope. Filesystem evidence shows namespace and object identity only within the captured mount namespace; it does not by itself show permissions, lower storage, persistence, service readiness or application-level correctness.

Next check: Continue from the first step that has not been verified: 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.

Step 5 Common mistakes Narrow the fault
  • Filling / because /var is not a separate filesystem.
  • Confusing disk space with inode exhaustion (df -i).
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
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic 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.

Subtopic /

/ is the root directory of a process mount namespace and the starting point for absolute pathname resolution; it is a namespace anchor, not a synonym for the root account, root home directory or necessarily one physical disk/partition.

Subtopic /boot

/boot conventionally stores boot-loader accessible artifacts such as kernel images, initramfs/initrd files, loader configuration and related boot metadata; EFI System Partition content is commonly mounted separately at /boot/efi or another configured path.

Subtopic /dev

/dev exposes device nodes and special endpoints used by user space to access kernel-managed devices; on modern Linux it is typically a dynamic devtmpfs/udev-managed namespace containing block, character and selected pseudo devices.

Subtopic /etc

/etc contains host-specific system and service configuration plus related policy files; it is primarily persistent configuration, while generated runtime state should normally live elsewhere such as /run or /var.

Subtopic /home

/home conventionally contains regular users’ home directories and persistent per-user data/configuration; it may be local, separately mounted, encrypted, automounted or provided by network storage and therefore should not be assumed to share the root filesystem.

Subtopic /opt

/opt is an FHS location for add-on application software packages that are largely self-contained beneath /opt/<package-or-provider>, often used by third-party software outside the distribution’s normal /usr hierarchy.

Subtopic /proc

/proc is a procfs pseudo-filesystem exposing dynamic kernel and process information through file-like interfaces such as per-PID directories, mounts, memory/system counters and selected tunables; most content is synthesized at access time rather than stored on disk.

Subtopic /root

/root is the conventional home directory for the root account, deliberately separate from /home so administrative access can remain available even when user-home storage is unavailable; it is not the filesystem root directory /.

Subtopic /run

/run is early-boot volatile runtime state, commonly a tmpfs, used for PID files, sockets, locks, service state and other data that should not survive reboot; many systems map legacy /var/run to /run.

Subtopic /srv

/srv is an FHS location intended for site-specific data served by services, such as web, FTP or repository content, but actual application and distribution layouts vary widely and many services use /var/lib, /var/www or custom paths instead.

Subtopic /sys

/sys is sysfs, a kernel-generated pseudo-filesystem representing devices, drivers, buses, classes and other kernel objects through attributes and links; it is a runtime view of the kernel object model rather than persistent disk content.

Subtopic /tmp

/tmp is a shared location for temporary files whose lifetime and cleanup policy are system-specific; it is often writable by all users with the sticky bit and may be disk-backed or tmpfs, so applications must not assume persistence, secrecy or unlimited capacity.

Subtopic /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.

Subtopic /var

/var contains variable persistent data such as logs, spool/queue data, caches, package/application state and databases, with subdirectory purpose depending on the service; growth under /var can impair system services even when another filesystem has free space.

Subtopic Inodes

Inodes are filesystem metadata objects that identify files/directories within a filesystem and hold metadata plus references to data, while directory entries map names to inode numbers; inode identity is filesystem-local and a file may have multiple hard-link names.

Subtopic Hard Links

Hard Links are multiple directory entries within the same filesystem that reference the same inode; all names are peers for the same underlying object, and removing one name does not remove the data until the final link and open references are gone.

Subtopic Symbolic Links

Symbolic Links are separate filesystem objects whose content is a pathname reference to another path; they can cross filesystem boundaries and can be absolute or relative, but resolution can fail when the target moves, disappears or is interpreted from a different namespace/location.

Subtopic File Types

Linux file type is encoded in inode mode metadata and distinguishes regular files, directories, symbolic links, block devices, character devices, FIFOs and sockets; filename extension is a naming convention and does not determine the kernel object type.

Key points

A path's content depends on what is mounted there: findmnt shows the mount for any path. A full or read-only filesystem affects everything under its mount point.

Key checks
  • findmnt — all mounts as a tree
  • 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

Start with the process mount namespace and pathname being resolved. Walk from / through each path component and mount crossing to the final directory entry and inode, identify the object type and metadata, then separate namespace success from permissions, backing-storage health and application semantics. A visible path is evidence about lookup, not automatic evidence that the intended filesystem, device or service is healthy.

ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

Filesystem evidence shows namespace and object identity only within the captured mount namespace; it does not by itself show permissions, lower storage, persistence, service readiness or application-level correctness.

In depth

Navigating the Linux directory tree by purpose

Every Linux system arranges its files in one tree starting at /, and each top-level directory has a defined job. The hier(7) manual page describes the main ones:

  • /etc holds configuration local to the machine.
  • /boot holds static files for the boot loader.
  • /dev holds device files.
  • /home holds user home directories.
  • /proc and /sys are kernel interfaces.
  • /run describes the system since boot.
  • /srv holds data served by the system.
  • /tmp holds temporary files that may be deleted without notice.
  • /usr holds programs and libraries.
  • /var holds variable data such as logs, caches, spools and state.

Finding things by question

QuestionLook in
Where is the configuration?/etc/<program>, /etc/<program>.d/
Where are the logs?/var/log, or the journal (journalctl)
Where does a service keep its data?/var/lib/<program>
Where are locally installed programs?/usr/local/bin, /opt/<package>
What's using the disk?/var (logs, caches, containers), /home, /srv
Where are runtime PID files and sockets?/run
Information about a process/proc/<pid>
Information about a device/sys/class/..., /sys/block/...

Tools

TaskCommand
Which file system is a path on?df -h <path>, findmnt -T <path>
Which package owns a file?dpkg -S <path> / rpm -qf <path>
Where are a program's files?dpkg -L <pkg> / rpm -ql <pkg>
Largest directoriesdu -xh --max-depth=1 / | sort -h
host$ findmnt -T /var/log
TARGET SOURCE                 FSTYPE OPTIONS
/      /dev/mapper/vg0-root   xfs    rw,relatime
host$ sudo du -xh --max-depth=1 /var 2>/dev/null | sort -h | tail -4
1.2G    /var/cache
3.8G    /var/log
14G     /var/lib
19G     /var
host$ dpkg -S /etc/nginx/nginx.conf
nginx-common: /etc/nginx/nginx.conf
host$ systemd-path | grep -E "system-(configuration|state|runtime)"

Reading the du output

-x keeps du on one file system, so mounted data disks and /proc aren't counted. Here /var/lib dominates. That usually means databases, container images (/var/lib/docker, /var/lib/containers) or package caches. Look there first when the root file system fills up.

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.

How it works at runtime

Filesystem is part of Filesystem. Filesystem is the Linux namespace and object-model foundation for paths: it explains how the root directory, mounted namespaces, FHS locations, directory entries, inodes, links and file types combine before later branches handle file-management commands, permissions or mount administration.

Runtime state ownership and mechanics. Linux filesystem access is mediated by the VFS, path lookup, dentries/inodes, mount namespaces, permissions/LSM checks and the backing filesystem or pseudo-filesystem. A pathname is resolved component by component and may cross mount points, bind mounts, symlinks and namespace boundaries. Pseudo-filesystems such as /proc, /sys and many entries under /run expose generated runtime state rather than ordinary persistent files. Link semantics, inode identity and open file descriptors can outlive directory-entry changes.

Topic-specific state model. Filesystem is the Linux namespace and object-model foundation for paths: it explains how the root directory, mounted namespaces, FHS locations, directory entries, inodes, links and file types combine before later branches handle file-management commands, permissions or mount administration.

Technical metadata. Process PID/session/container/chroot and mount-namespace identity, absolute/relative pathname, root mount, path components, mount points and filesystem/source type, symlink target chain, filesystem/device identity, inode number, file type/mode, UID/GID/ACL/security context where relevant, link count, size/timestamps, block and inode capacity, pseudo-filesystem/kernel object identity, device major/minor, process/socket/open-file references, package/service ownership, effective consumer identity and original workload result.

Interpretation rule. - Filesystem namespace ≠ one physical filesystem; a path may cross several mounts or virtual filesystems.

  • Root directory / ≠ root user home /root, and neither term should be inferred from the other.
  • Path exists ≠ intended backing mount is present; an underlying directory can be exposed when a mount is absent.
  • Readable metadata ≠ successful workload I/O, durability or application correctness.

Quick reference

The Linux filesystem is one tree rooted at /; other filesystems are mounted into it. Key distinctions:

KindExamples
Static, read-mostly/usr, /boot, /opt
Variable data/var, /srv, /home
Configuration/etc
Virtual (kernel)/proc, /sys, /dev, /run
Temporary/tmp, /var/tmp
findmnt --real
lsblk -f
df -hT
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. Filesystem evidence shows namespace and object identity only within the captured mount namespace; it does not by itself show permissions, lower storage, persistence, service readiness or application-level correctness.

Model. Path existence does not show that every process sees the same object, because mount namespaces, chroot and containers can present different trees. Free blocks do not imply free inodes, and mode bits do not capture ACLs, capabilities or LSM policy. Deleting a file does not necessarily release space while a process holds it open. A clean filesystem mount does not show the backing block path is healthy under load. Preserve pathname, inode, mount and device identity as separate evidence.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Configuration intent and lifecycle. Persistent layout comes from filesystem creation, mount configuration, ownership/mode/ACL/label metadata and service/package conventions. Before changing content under system directories, establish whether a package manager, generator, tmpfiles rule, service or administrator owns it. Replacing a symlink or mount point can redirect consumers without changing the underlying object. For pseudo-filesystems and generated paths, change the responsible subsystem rather than treating the visible file as the source of truth.

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. 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
linux filesystem basicslinux filesystem hierarchylinux paths and inodeslinux filesystem namespace
Embedded reference data

Quick lookup tables

Filesystem operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Filesystem.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateFilesystem is the Linux namespace and object-model foundation for paths: it explains how the root directory, mounted namespaces, FHS locations, directory entries, inodes, links and file types combine before later branches handle file-management commands, permissions or mount administration.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 chainprocess mount namespace → pathname components → mount crossing/backing filesystem → dentry/name lookup → inode/object metadata → file type + ownership/mode/ACL → data/device/pseudo-file operation → consumer-visible resultTrace requested/configured state through effective state to the observed workload result.
Failure boundaryFilesystem evidence proves namespace and object identity only within the captured mount namespace; it does not by itself prove permissions, lower storage, persistence, service readiness or application-level correctness.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: process mount namespace → pathname components → mount crossing/backing filesystem → dentry/name lookup → inode/object metadata → file type + ownership/mode/ACL → data/device/pseudo-file operation → consumer-visible 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. Filesystem evidence proves namespace and object identity only within the captured mount namespace; it does not by itself prove permissions, lower storage, persistence, service readiness or application-level correctness.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 · operational reference

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

Reference boundaryFilesystem
Topic pathFilesystem
Runtime stateFilesystem is the Linux namespace and object-model foundation for paths: it explains how the root directory, mounted namespaces, FHS locations, directory entries, inodes, links and file types combine before later branches handle file-management commands, permissions or mount administration.
Fast checks- Capture the exact process/container mount namespace and pathname before reasoning about what / refers to. - Identify mount crossings, final object type, inode/metadata and whether the path is local, virtual, networked or bind-mounted. - Separate path lookup from ownership/mode/ACL, free-space/inode capacity and lower storage health. - Verify the original consumer read/write/execute behavior after proving the namespace and object identity.
Verification chainprocess mount namespace → pathname components → mount crossing/backing filesystem → dentry/name lookup → inode/object metadata → file type + ownership/mode/ACL → data/device/pseudo-file operation → consumer-visible 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 boundaryFilesystem evidence proves namespace and object identity only within the captured mount namespace; it does not by itself prove permissions, lower storage, persistence, service readiness or application-level correctness.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?