How to Check Available Disk Space in Ubuntu

The Capacity Monitoring Vector

If you are administering an Ubuntu server hosting a high-traffic database or acting as a primary backup repository, you must constantly monitor the physical limits of your storage hardware. If the primary root partition reaches 100% capacity, the server will enter a catastrophic failure state: logs will fail to write, databases will corrupt, and you may be completely locked out of SSH access. You must routinely interrogate the Linux kernel for a precise storage audit.

How to Check Available Disk Space

The Linux command line possesses a highly specialized utility designed to instantly report the total size, used space, and remaining capacity of every mounted file system.

1. Open your terminal application or connect to your server via SSH.
2. The utility you require is df (disk free). However, running it without flags will output a confusing wall of numbers in raw 1-kilobyte blocks. You must use the “human-readable” flag to force the output into Megabytes and Gigabytes.
3. Type the following command exactly:

df -h

4. Press Enter.
5. Analyzing the Output: The terminal will instantly generate a perfectly formatted table. You must focus on the columns and the specific mount points:
* Filesystem: The physical (or virtual) hard drive partition (e.g., `/dev/sda1`).
* Size: The total mathematical capacity of that drive.
* Used / Avail: Exactly how many gigabytes are consumed, and how many are remaining.
* Use%: The critical metric. If this number is above 90%, you must take immediate action.
* Mounted on: This tells you where the drive exists in the file system. The most important row is usually the one mounted on `/` (the root directory), as this contains the core operating system and application data.

Get the best tech tips delivered straight to your inbox.

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