How to Find Out How Much Free Disk Space You Have in Linux Using df

If you are attempting to download a massive software update or pull a giant database dump onto your Linux server, the operation will violently crash if your hard drive runs out of space. Before starting any large file transfer, you must verify exactly how much storage space is currently available on your machine.

In a graphical desktop environment, you could simply click properties on your home folder, but on a headless Linux server, you must rely on the df (Disk Free) command.

How to Use the df Command

The df utility is part of the GNU coreutils package, meaning it is universally available on every single Linux distribution.

However, if you simply type df and press Enter, the terminal will output a highly confusing table where the file sizes are measured in raw 1K-blocks (kilobytes), making the math incredibly difficult to interpret at a glance.

The Human-Readable Flag

To convert those massive string of numbers into easily understandable Gigabytes (G) and Megabytes (M), you must always append the -h (human-readable) flag.

  1. Open your Linux terminal.
  2. Execute the following exact command:
    df -h

The terminal will instantly print a formatted table displaying every single partition and drive currently mounted to the system.

How to Read the Output

The output table contains several columns. The most important ones are:

  • Size: The total absolute capacity of that specific hard drive partition.
  • Used: How much data is currently stored on it.
  • Avail: The exact amount of free space remaining (this is the number you need).
  • Use%: A simple percentage showing how full the drive is.
  • Mounted on: The location in the Linux file system where this drive exists.

If you only have one main hard drive installed in your computer, look specifically for the line where the Mounted on column reads simply / (the root directory). The number displayed in the Avail column for that row (e.g., 112G) is exactly how much free space your Linux installation currently possesses.

(Note: You can safely ignore all the temporary, virtual file systems listed in the output, such as tmpfs or udev, as these exist purely in RAM, not on your physical hard drive).

Get the best tech tips delivered straight to your inbox.

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