system
df
Reports filesystem disk-space usage. Shows total, used, and available space per mounted filesystem.
df [OPTION]... [FILE]... Common flags
| Flag | Purpose |
|---|---|
| -h | Human-readable sizes (KB, MB, GB) |
| -H | Human-readable, powers of 1000 instead of 1024 |
| -T | Print the filesystem type |
| -i | List inode information instead of blocks |
| -x | Exclude a filesystem type (e.g. -x tmpfs) |
| --total | Print a grand total line |
Examples
df -h Human-readable usage per mount
df -hT -x tmpfs -x devtmpfs Real disks only, with filesystem type
df -i /var Check inode usage on /var
df -h --total /home /var Report and total selected mounts
Gotcha
df counts space known to the filesystem; deleted-but-still-open files show as used until the holding process exits.
Related commands
du
Estimates disk usage of files and directories. Great for hunting the source of a full filesystem.
free
Displays free and used memory including RAM and swap. Reads from /proc/meminfo and summarizes at a glance.
ls
Lists directory contents including files and subdirectories. Supports detailed views, sorting, and filtering to inspect the filesystem quickly.