Vol. I · No. 46The command line sectionSat, 10 Oct 2026
Linux · disks & space

df

how full are the disks

df — disk free — lists every mounted filesystem with its size, the space used and the space still available. It answers "is a disk full?" for the whole machine at once, and it shows which directory each disk is attached to.

df tells you which disk is full; du tells you what is filling it.

Shows
Each filesystem
one line per mount
Readable sizes
-h
G and M instead of blocks
Watch
Use%
trouble begins near 100%
Also
Inodes, with -i
the other thing that runs out

At the terminal

Read the session first, then the notes: each numbered line in the output is answered by the note with the same number.

user@netflow — bashcoreutils
$ df -h
1Filesystem Size Used Avail Use% Mounted on
2tmpfs 794M 1.6M 793M 1% /run
3/dev/sda2 98G 41G 53G 44% /
/dev/sda1 1.1G 6.1M 1.1G 1% /boot/efi
4/dev/sdb1 458G 412G 23G 95% /home
Illustrative session · names, sizes and dates are examples, and every address is from a documentation or private range
Reading the output

What the numbered lines are telling you

1
Six columns

The device, its total size, the space used, the space available, the percentage used, and the directory it is mounted on.

2
tmpfs is memory, not a disk

A filesystem held in RAM. /run lives there, which is why it is empty after every boot.

3
The root filesystem

The second partition of the first disk, mounted on /. 44% used, with 53 GB free — healthy.

4
This one needs attention

/home is on a separate disk and is 95% full. Used and Avail do not add up to Size because a few percent is reserved for root.

Switches

A switch changes how the command behaves. These are the ones used day to day; man df lists the rest. Single-letter switches can usually be joined, so -l -a may be written -la.

-h
Human-readable sizes in powers of 1024: K, M, G.
-H
The same, in powers of 1000 — as disk manufacturers count.
-T
Add a column showing each filesystem’s type: ext4, xfs, tmpfs.
-i
Show inodes instead of space — a disk can run out of these while space remains.
-x TYPE
Exclude a filesystem type, for example -x tmpfs.
--total
Add a final line with the grand total.

Variations worth knowing

The same tool, pointed at a narrower question. These four cover most of what it is reached for day to day.

df -h /var

Shows only the filesystem that holds a given directory.

df -hT

Adds the filesystem type — ext4, xfs, tmpfs — as a column.

df -i

Shows inodes: a disk with space left but no free inodes cannot create files.

df -h -x tmpfs -x devtmpfs

Hides the in-memory filesystems, leaving the real disks.

In cybersecurity

A full disk is an outage and a blind spot at the same time: services stop, and so does logging.

A full disk stops the logs

When /var fills, nothing more can be recorded. Filling the disk is a known way to make a system stop writing evidence.

Keep growth away from /

With logs, uploads and home directories on their own filesystems, one of them filling up cannot stop the machine from booting or logging in.

Unexpected mounts

df lists what is attached. A network share or a disk nobody remembers mounting is a place data can arrive from, or leave by.

Filed under

Disks & space

Read alongside