System and processes

The df command

Shows the free and used space of mounted disks.

Syntax

df [-h]

Most useful options

-hHuman-readable sizes (K, M, G)
-TIncludes the filesystem type

Copy-ready examples

$ df -hSpace per disk
$ df -h /Only the root

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • If a disk fills to 100%, the system starts failing in strange ways.

Related commands

FAQ

df or du?

df looks at the whole disk; du measures a specific folder.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course