How to Check Disk Space on Ubuntu?

Managing your storage is a fundamental part of maintaining a healthy Linux environment. This guide provides a quick overview of how to check the available disk space on an Ubuntu system using both the command-line interface (CLI) and the graphical user interface (GUI). Whether you need a fast, detailed breakdown in the terminal or a visual representation of your storage, the following methods will show you exactly how much space you have left and where your files are hidden.

Checking Disk Space via the Command Line

The terminal is the fastest way to get accurate storage data. Ubuntu includes two powerful, built-in commands for this task: df and du.

df -h

This outputs a list of all mounted filesystems, their total size, used space, available space, and usage percentage. * The du Command (Disk Usage): While df shows overall system space, du helps you track down which specific directories or files are consuming the most storage. To check the size of the current directory and its subdirectories in a human-readable format, run:

du -sh *

The -s flag gives a summary (total size) for each item, preventing a massive wall of text.

Checking Disk Space via the GUI

If you prefer a visual approach, Ubuntu’s desktop environment offers intuitive built-in tools to inspect your storage without typing commands.