How to Check Your Disk Space Usage in Ubuntu

The Storage Diagnostics Vector

Operating a headless Ubuntu Linux server requires constant vigilance regarding storage capacity. If the primary partition holding your databases or system logs reaches 100% capacity, the server will suffer a catastrophic failure, corrupting data and refusing all new connections. Administrators cannot rely on graphical pie charts to monitor this; they require a rapid, command-line utility capable of instantly displaying the exact storage limits and current consumption of every mounted drive.

How to Check Your Disk Space Usage

The universal, highly reliable tool for querying file system disk space on Linux is the df (disk free) command.

1. Open your terminal application or connect to your server via SSH.
2. To query the raw storage statistics for every mounted partition, execute the base command:

df

3. However, the default output displays capacities in raw 1K blocks, which is incredibly difficult for humans to quickly parse. To format the output into readable Megabytes and Gigabytes, execute the command with the -h (human-readable) flag:

df -h

4. The terminal will output a cleanly formatted table. You must locate your primary drive. Look at the column furthest to the right, labelled Mounted on.
5. Find the row where the “Mounted on” value is simply a single forward slash (/). This represents your core operating system root partition.
6. Look across that specific row. The Size column dictates the absolute maximum capacity of the drive. The Used column shows what you have consumed, and the Use% column provides the critical metric you must monitor.

If your root partition (/) is operating above 90% capacity, you must immediately begin deleting old log files or expanding the server’s storage allocation to prevent an imminent crash.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.