How to Check Free Disk Space in Ubuntu

The Storage Capacity Vector

Operating a headless Ubuntu server requires constant vigilance regarding storage allocation. If a massive database query generates an unexpected 500GB temporary cache file, or if automated error logs silently consume the entire hard drive, the operating system will suffer a catastrophic failure. When the disk reaches 100% capacity, the Linux kernel cannot write new data, resulting in instant application crashes and database corruption. You must routinely interrogate the file system to analyze the exact mathematical availability of your storage blocks.

How to Check Free Disk Space

The Ubuntu architecture provides the highly efficient `df` (disk free) utility to rapidly calculate the remaining capacity of all mounted file systems.

1. Open your terminal application or connect to the server via SSH.
2. The Raw Execution (Unreadable Output):
* If you simply type `df` and press Enter, the kernel will return a massive grid of data.
* However, the numbers in the “1K-blocks” column are displayed in raw kilobytes. A number like `489231456` requires manual mathematical conversion to understand. This is inefficient.
3. The Human-Readable Override (Mandatory Protocol):
* You must append the `-h` flag. This instructs the utility to algorithmically translate the raw blocks into easily comprehensible Megabytes (MB), Gigabytes (GB), or Terabytes (TB).
* Type the following command:

df -h

* Press Enter.
4. Analyzing the Telemetry Grid:
* The terminal will output a highly structured table.
* Filesystem: Identifies the specific hardware partition or virtual drive (e.g., `/dev/sda1` is usually your primary physical hard drive).
* Size: The absolute maximum capacity of that partition.
* Used: The amount of space currently occupied by data.
* Avail: This is the critical number. This is the exact amount of free space remaining before a system crash.
* Use%: A rapid visual indicator (e.g., `85%`). If this number hits 95% on your root partition (`/`), you must immediately begin a data purge.
* Mounted on: Shows where the drive is attached to the system (e.g., `/` is the root OS, while `/mnt/backup` might be an external drive).

Get the best tech tips delivered straight to your inbox.

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