The Physical Sector Audit Vector
When operating a headless Ubuntu server (such as a database node or a web server), mathematically verifying your available solid-state storage capacity is a critical diagnostic protocol. If the master `/var/log` directory fills completely, or if a rogue MySQL dump consumes the remaining free sectors, the Linux kernel will mathematically crash, dropping all incoming network packets and bricking the active daemons. You cannot rely on visual disk icons; you must instruct the core OS to execute a rapid, God-level audit of the physical block devices and output their exact alphanumeric capacity parameters.
How to Check Disk Space in Ubuntu
The UNIX architecture provides deeply embedded, instantaneous command-line utilities specifically engineered to extract capacity telemetry from the file allocation tables without requiring `sudo` privileges.
1. Open your terminal application or connect to the server via SSH.
2. Method 1: The Disk Free Command (The Supreme Protocol):
* This is the standard execution pathway for extracting global partition data.
* Type exactly:
df -h
* Press Enter.
* The Mathematical Translation: The `df` (Disk Free) command interrogates the file system. The `-h` (Human-readable) flag instructs the daemon to output the data in Megabytes (M) and Gigabytes (G), rather than raw byte blocks.
* The Diagnostic Dump: The shell will output a structured grid. Look for the row representing your primary root partition (usually mounted on `/` and named `/dev/sda1` or `/dev/mapper/ubuntu–vg-ubuntu–lv`). The “Avail” column dictates your exact remaining capacity, while the “Use%” column indicates the saturation level.
3. Method 2: The Disk Usage Command (The Granular Audit):
* If `df -h` reveals your drive is 99% full, you must mathematically identify which specific directories are consuming the payload.
* Navigate to the root directory by typing cd /.
* Type exactly (requiring God-level access to scan protected folders):
sudo du -sh *
* Press Enter.
* The Mathematical Translation: The `du` (Disk Usage) command recursively calculates file sizes. `-s` (Summary) prevents it from outputting every single file, instead giving the total for each top-level directory. `-h` is human-readable. `*` acts as the wildcard for all files.
* The Diagnostic Dump: The terminal will output a list of every primary directory (`/var`, `/home`, `/usr`) alongside its exact gigabyte footprint, allowing you to surgically target the bloated directories for annihilation.
4. Method 3: The GUI Abstraction (Desktop Ubuntu Only):
* If you are operating a full Ubuntu Desktop environment with GNOME.
* Press the Super Key (Windows key), type exactly Disks, and press Enter.
* The GNOME Disks GUI will launch, rendering a visual bar graph of the physical sectors, partitioned volumes, and remaining gigabytes.