Tuesday, August 11GNOME IT SOLUTIONS LLC

Check Disk Space in Linux: df, du & ncdu Explained

Monitor and troubleshoot Linux disk usage with df, du, and ncdu.

Step 1: Check Filesystem Usage with df

Run df -h to see total, used, and available space on all mounted filesystems.

df -h check disk space linux
Step 1: Check Filesystem Usage with df

Step 2: Find Directory Sizes with du

Use du -sh /path/* to find which directories consume the most space.

du -sh directory size linux
Step 2: Find Directory Sizes with du

Step 3: Interactive Analysis with ncdu

Install ncdu and run ncdu /var for an interactive disk usage browser.

ncdu interactive disk analyzer linux
Step 3: Interactive Analysis with ncdu
df -i   # check inode usage
ncdu --exclude /proc /

Terminal screenshots are original illustrations created for Gnome IT Solutions (blog.gnomeitsolutions.com).