$
Learn Linux handbook
en
XP:0
Quest 50Spacer
+150 XP

Checking Disk Space (df)

Launch Interactive Terminal for This Quest→No installation required • Runs fully in browser

Concept & Overview

Imagine trying to download a huge video game and getting a "storage full" error, but you aren't sure which disk drive is the bottleneck. In Linux, we check our system's storage capacity using the df (disk free) command.

- The df command displays the total, used, and available space on all your connected drives.
- By running df -h (adding the -h flag for "human-readable"), you see storage in friendly gigabytes (G) and megabytes (M) instead of confusing block counts, making it easy to spot which drive (like / or /home) is full.

Why this matters: If you run df without -h, the sizes are displayed in raw 1K-block numbers (e.g., 49258284 instead of 47G), which is extremely hard for a human to read and calculate. The -h flag formats these sizes into human-friendly gigabytes (G) and megabytes (M).

Let's check our system storage. Run df -h to see how much space is left on your partitions in a human-readable format.

Command Syntax Reference

Command / SyntaxDescription
df -hShow free disk space on filesystems in human-readable format

Verification Objectives

These conditions will be automatically verified when you run commands inside the interactive terminal simulator:

  • ○
    Run the "df -h" command

Ready to complete Quest 50?

Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.