$
Learn Linux handbook
en
XP:0

Chapter 06 of 17

Diagnose storage and memory

Distinguish capacity, filesystem usage, mounts, memory pressure, and device layout.

The mental model.

lsblk shows block devices and their relationships. A partition is a slice of a device; a filesystem organizes data; a mount makes a filesystem visible at a directory. The mount point can hide pre-existing contents until it is unmounted.

df reports filesystem capacity and usage; du walks directory entries to estimate their use. They can disagree because of deleted-but-open files, permissions, mount boundaries, or filesystem accounting. Check inode exhaustion with df -i on a real machine.

Linux uses spare RAM as reclaimable cache. Low free memory alone is not an outage: inspect available memory, swap activity, and workload symptoms. Load average describes runnable or uninterruptible tasks, so compare it with CPU count and I/O behavior.

Do not practice formatting, partitioning, or dd against a host disk. Use an explicitly disposable virtual disk and confirm its identity. A mistaken device name can destroy a working filesystem.

Read it. Predict it. Try it.

Before running these commands, predict what each line will change or print. Launch a quest below to open the simulated terminal.

lsblk
df -h
du -sh /home/learner
free -h
uptime

Collect device, filesystem, directory, memory, and load evidence before deciding what resource is constrained.

Check your understanding

Explain the why.

Why can df show more used space than du finds?

Put it into practice.

Complete the exercises, then try the Boss Challenge without hints. Each quest checks its own objectives. You can revisit this chapter at any time.

Prefer to read first?

Make the learning stick.

Close the explanation and describe the main idea in your own words. Change a filename or input and predict the outcome. Tomorrow, repeat a quest without hints. Then apply it in a disposable real Linux environment.

Open the real-system labs →