Think of your Linux computer or server like a bedroom closet. Sometimes you want to ask two very different questions: "How much empty space is left in the whole closet?" and "Which specific storage box is taking up all the room?"
Linux gives you two tiny, friendly commands for those exact two questions: df (disk free) and du (disk usage).
1. Check Overall Free Space with df -h
The df command shows the big picture of every drive attached to your system. Always add -h (which stands for human-readable) so Linux shows sizes in friendly Megabytes (M) and Gigabytes (G) instead of millions of tiny blocks.
# Show free and used space on all drives in human-readable format
df -h
Look at the Avail (Available) and Use% columns on the row ending with / (your main drive). If Use% is below 80%, your server has plenty of breathing room.
2. Find Large Folders with du -sh
If your drive is getting full, du helps you peek inside a folder to see what is heavy. Adding -s (summary) gives one total per item, and -h keeps the numbers easy to read.
# Check the total size of the current folder
du -sh .
# Check the size of every item inside the current folder
du -sh *
Beginner Server Safety Tip
Before deleting anything to free up space, always check what is inside a folder with ls -la first. Stick to removing things you recognize—like old backups or temporary downloads in your home folder—and avoid deleting system folders you did not create.
3 Things to Remember
df -h= Big picture: Shows how full your entire hard drive is.du -sh *= Folder details: Shows which folders or files inside your current directory are largest.- Always add
-h: It turns raw numbers into easy-to-readMBandGBunits.