Linux Filesystems

Linux Filesystem Hierarchy

Learn how Linux organizes configuration, user data, programs, logs, runtime state, and temporary files, then inspect the correct path before making a change.

Beginner15 min read
Linux Filesystems lessonLinuxPractice

UNTIMED COACHING

Practice before the pressure

Use feedback to correct the model, not merely memorize an option position.

GUIDED PRACTICE

Practice the lesson questions

Answer normal lesson questions without a timer. Every answer includes an explanation, and incorrect answers can be tried again before continuing.

COMMAND EVIDENCE

Map the path before changing it

Read the command together with the observable result. The full Learn section explains what this evidence proves and what it does not prove.

$ namei -l /var/log/nginx/access.log
f: /var/log/nginx/access.log
drwxr-xr-x root root /
drwxr-xr-x root root var
drwxrwxr-x root syslog log
drwxr-x--- root adm nginx
-rw-r----- www-data adm access.log
Read the full command context in Learn

CONCEPT MODELS

See the lesson as a system

Use these visual guides to connect the key ideas before answering the questions.

Directory RolesConfiguration, user data, service state, and temporary data have distinct homes.
Directory RolesA split model separates host configuration and user data from variable and temporary service data.
/etcHost-specific configuration
/homeRegular user home data
/varChanging logs and service state
/tmpTemporary working data
Capacity InvestigationFilesystem capacity and directory usage answer different questions.
Capacity InvestigationAn operator checks filesystem space, locates the mount, narrows directory usage, and verifies cleanup.
df resultShows containing filesystem space
findmnt resultIdentifies the mount boundary
du resultNarrows file and directory usage
Repeated checksConfirm recovered capacity