Skip to main content

Command Palette

Search for a command to run...

🖥️ Checking Disk Size in Linux | The Best Tools for the Job 🚀

Monitoring Disk Usage in Linux | Top Tools for Keeping Storage in Check

Updated
🖥️ Checking Disk Size in Linux | The Best Tools for the Job 🚀
R

Driving SD-WAN Adoption in South Africa

If you're running Linux, keeping an eye on your disk usage is crucial—especially if your storage starts filling up mysteriously. 😱 Fortunately, Linux provides several powerful tools to check disk size, monitor usage, and clean up space when needed. Let's explore some of the best ways to get a disk space reality check and how to hunt down those space-hogging files.


🔍 1. Using df -H (Disk Free)

The df (disk free) command is a quick and easy way to check the size and available space of mounted filesystems.

Run the following command in your terminal:

df -H

This will display something like:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1      500G  320G  180G  64% /
tmpfs          4.2G  2.1M  4.2G   1% /dev/shm
/dev/sdb1      2.0T  1.3T  700G  65% /mnt/data

✅ Why use df -H?

✔️ Quick overview of disk usage
✔️ Shows total disk size, used space, and free space
✔️ -H makes the output human-readable (e.g., GB instead of bytes)


📊 2. Checking Disk Usage with btop

For a modern and interactive view of system performance, btop is an awesome tool.

Install btop:

sudo apt install btop -y   # Debian/Ubuntu
sudo dnf install btop -y   # Fedora/RHEL

Then, simply run:

btop

You'll get a real-time dashboard with CPU, memory, network, and disk usage stats. 🕵️‍♂️

✅ Why use btop?

✔️ Real-time monitoring of disk usage
✔️ Graphical interface (without needing a GUI)
✔️ Great for tracking disk activity and bottlenecks


🏆 3. The Best Tool for Finding Large Files: ncdu

If you're running out of space and need to find the biggest offenders, ncdu (NCurses Disk Usage) is the ultimate tool. 🔥

Install ncdu

sudo apt install ncdu -y   # Debian/Ubuntu
sudo dnf install ncdu -y   # Fedora/RHEL

Run ncdu in the root directory to scan everything:

sudo ncdu /

This will scan your entire system and present a sortable, interactive list of the largest files and directories. You can navigate using the arrow keys and even delete files directly from the interface by pressing d. 🗑️

✅ Why is ncdu the best?

✔️ Faster than du (Disk Usage)
✔️ Sorts files by size automatically
✔️ Interactive interface makes cleanup easy
✔️ Saves time when dealing with full disks


🎯 Wrapping Up

Linux gives you many ways to check your disk usage, but the best approach depends on what you're trying to do:

🛠 Need a quick summary? → Use df -H
📊 Want real-time stats? → Use btop
🔍 Need to track down big files? → Use ncdu

If you're dealing with low disk space, ncdu is the best tool to hunt down and delete unnecessary files. Happy cleaning! 🧹✨

Got questions or need more tips? Drop them below! ⬇️