Rain Wiki · Linux

df (disk free)

How to read df output, why Use% can reach 100% before Avail is zero for normal users, and how to check inodes with df -i.

Linux · Rain Wiki

df (disk free) is the standard command that shows the size, used space, available space and mount point of each mounted file system. 'df -h' prints sizes in human-readable units; 'df -i' shows inode usage instead of bytes, which explains 'No space left on device' errors when bytes are still free.

Reading the columns

Filesystem is the device, Size the total, Used and Avail the space used and free for normal users, Use% the percentage, and Mounted on the directory where it appears.

On ext4, about 5% is reserved for root by default, so Used + Avail can be smaller than Size and normal users can run out before Use% shows 100%.

Useful options

'-T' adds the file system type, '-x tmpfs' hides temporary memory file systems, and 'df -h /var' shows only the file system that holds /var.

How to check free space

  1. Run: df -hT -x tmpfs
  2. Find the file system with high Use%.
  3. Check inodes too: df -i
  4. Then look inside with du or ncdu to find what uses the space.

Cautions

  • Never fill the root file system to 100%: services, logins and package updates can fail.

Note: RainServer offers monitoring and safe cleanup for Linux servers; it shows what will change and asks first.

Sources

Last updated: 2026-10-08

Related articles