df shows how much space each filesystem has left. Learn how to read `-h` output, how `df -h .` names the filesystem you are writing to, and why `df -i` explains a full disk with space on it, by running the commands in a real terminal in your browser.
Updated: 2026-09-06
df [options] [path]
With no path it lists every filesystem on the machine.
-h prints readable sizes.
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 20G 5.0G 14G 27% /
/dev/sda2 40G 10G 28G 27% /home
/dev/sda3 1.0G 205M 819M 20% /boot
tmpfs 2.0G 0 2.0G 0% /tmp
tmpfs 800M 1.0M 799M 1% /run
devtmpfs 2.0G 0 2.0G 0% /dev
Each line is one filesystem.
| Column | Meaning |
|---|---|
Filesystem | The device |
Size | Total size |
Used | In use |
Avail | Still free |
Use% | Percentage used |
Mounted on | Where that device appears in the tree |
The two columns worth reading are Use% and Mounted on.
A row near 100% tells you which path is full.
Given a path, df prints only the filesystem holding it.
$ df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 40G 10G 28G 27% /home
You do not have to know the mount point. Hand it the directory you are writing to and it names the filesystem in charge.
$ df -h /boot
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 1.0G 205M 819M 20% /boot
Small partitions such as /boot are the ones that quietly fill up.
A filesystem also limits how many files it can hold.
Those slots are inodes, and -i reports them.
$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 1310720 100000 1210720 8% /
/dev/sda2 2621440 50000 2571440 2% /home
/dev/sda3 65536 320 65216 0% /boot
tmpfs 524288 10 524278 0% /tmp
tmpfs 524288 50 524238 0% /run
devtmpfs 524288 300 523988 0% /dev
When Use% looks fine but writes fail, read IUse% instead.
Session files and caches that create huge numbers of tiny files run out of inodes first.
df is the first command to type when something says it is out of space.
| Situation | What to type |
|---|---|
| Find what is full | df -h |
| Check the place you are writing to | df -h . |
| Look at the log partition | df -h /var/log |
| Space left but writes failing | df -i |
| Hunt down the culprit once you know where | du -h --max-depth=1 |
Locate with df, dig with du.
That order handles most disk incidents.
Without -h the numbers are blocks.
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 20971520 5242880 14680064 27% /
/dev/sda2 41943040 10485760 29360128 27% /home
/dev/sda3 1048576 209715 838861 20% /boot
tmpfs 2097152 0 2097152 0% /tmp
tmpfs 819200 1024 818176 1% /run
devtmpfs 2097152 0 2097152 0% /dev
Readable for a script, hard work for a person, so add -h when you are the one reading.
A path has to exist.
$ df -h /nope
df: '/nope': No such file or directory
Deleting a file does not always free the space.
While a process still holds the file open, the space stays taken.
When df refuses to drop, look for the process holding it.
webterm.appthis site
Advanced Terminal Commands
Learn commands for specific situations
learn.webterm.appa separate site

Commands stick when they show up in a real sequence of work, not one at a time. There is a course that builds them up in order.
See the course