“Where did all my disk space go?” Every Linux user asks this question eventually. The good news is that Linux gives you two small, honest tools to answer it: df for the big picture and du for hunting down the exact folder that is eating your storage. Learning to check disk space in Linux with these two commands takes five minutes and will save you from the mysterious “disk full” crash that always seems to happen at the worst moment.
df vs du: Two Different Questions
Beginners mix these up, so let us make it crystal clear:
df(disk free) answers: “How full is each disk or partition?” It talks to the filesystem and reports totals.du(disk usage) answers: “How much space does this folder and its contents use?” It walks through files and adds up their sizes.
Think of df as checking the fuel gauge of your car, and du as opening the trunk to see which suitcase is the heavy one. To check disk space in Linux properly, you usually start with df, then zoom in with du.
Check Disk Space in Linux with df (the Big Picture)
Run this command:
df -h
The -h means “human readable”: sizes are shown as 50G or 812M instead of raw blocks. Without it, the numbers are nearly impossible to read. The output has one line per filesystem, with columns for total size, used space, available space and the percentage used.
How to read it like a beginner:
- The line mounted on
/(a single slash) is your main disk, the root filesystem. This is the line that matters most. - Lines starting with
tmpfslive in memory, not on your disk. You can ignore them when hunting for space. - If the
Use%column for/climbs above 90%, it is time to clean up. At 100%, programs start failing in strange ways.
Want the total for a specific place only? Point df at it: df -h /home shows the filesystem that holds your home folder.

Check Disk Space in Linux with du (Finding the Big Folder)
Once df tells you the disk is 95% full, du finds the culprit. To see the total size of one folder, use:
du -sh /home/alex/Downloads
The -s asks for a single summary total, and -h keeps it human readable. The real power move is listing the biggest items inside a folder:
du -h --max-depth=1 /home/alex | sort -hr | head -10
Do not panic at the length; read it in parts. du measures every subfolder one level deep, sort -hr orders them biggest first, and head -10 keeps only the top ten. This one line is the fastest way to discover that an old folder of videos is using 40 GB. Repeat the command inside the biggest folder to zoom in further, like a detective following a trail.
Two Variations Worth Knowing
First, disks can also run out of inodes — the little index slots that track files. A disk with millions of tiny files can refuse to create new ones while df still shows free space. Check with df -i; the fix is finding and removing the folder full of tiny files, which du is perfect for. Second, when du reports a folder that looks suspiciously small, remember that some files are “sparse”, full of empty space that du does not count. The flag du --apparent-size -sh folder/ shows the size the files claim to be, which explains the difference.
Common Beginner Mistakes
- Confusing disk space with memory.
dfandduare about storage. RAM is a different thing, shown byfree -h. A full disk and full memory cause very different symptoms. - Running bare df or du. Without
-hthe block numbers are painful to read. Make-ha reflex. - Running du on the whole disk.
du -sh /can take a long time and prints permission errors. Start from your home folder or another specific path. - Deleting the wrong thing. Finding a big folder is only step one. Check what it is before removing it, and prefer uninstalling old programs or clearing caches over deleting files you do not recognize.
- Wondering why df and du disagree. If a program still holds a deleted file open, df counts the space as used while du cannot see the file. Restarting that program releases it. It is rare, but good to know.
What to Do When the Disk Really Is Full
When df shows a filesystem at or near 100%, act quickly: programs cannot write logs, databases refuse to save, and updates fail. Our step-by-step guide on fixing the “No Space Left on Device” error walks through the safe cleanup options, from clearing package caches to finding huge log files.
Conclusion
To check disk space in Linux, remember the pair: df -h for the fuel gauge and du -sh for the heavy suitcases. Together they answer both “how full is my disk?” and “what is using it all?” in seconds. Make a habit of running df -h once in a while, long before you reach 100%. For the full list of options, the official df manual page is short and beginner friendly.