Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsUse df -h to see available space on mounted filesystems. Use du to find which directories and files are using space. These commands answer different questions: df reports filesystem capacity, while du estimates usage within a path.
Check available space with df
Run this for a quick overview of mounted filesystems:
df -h
In GNU Coreutils, -h formats values using powers of 1024, making the output easier to scan. To use powers of 1000 instead, run:
df -H
To check the filesystem that contains a particular path, supply the path. For example, df -h /var reports the filesystem containing /var. Running df without a path shows mounted filesystems; it does not inspect an unmounted filesystem.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute#1 Best Overall
Find which directories are using space with du
Use du to estimate usage associated with a directory tree. To get one total for a directory, run:
du -sh /path/to/directory
To see entries beneath that directory, omit the summary option:
du -h /path/to/directory
GNU Coreutils du can limit the report to the directory and its immediate subdirectories with --max-depth=1:
du --max-depth=1 -h /path/to/directory
To quickly list large entries, the Linux Foundation’s Linux.com archive article gives this numeric-output example:
du -a /path/to/directory | sort -n -r | head -n 10
It sorts the reported sizes in descending numeric order and prints the first ten results. Treat it as a quick diagnostic, not a polished report: output can be affected by very large trees, permission errors, locale, filenames, and differences among command implementations.
Choose the right command for the question
| Command | What it answers | What it examines |
|---|---|---|
df |
How much capacity and available space does a filesystem report? | Mounted filesystems, or the filesystem containing a supplied path |
du |
Which files and directories account for usage under a path? | A specified directory hierarchy |
Jack Wallen’s Linux.com archive article, republished by the Linux Foundation on January 7, 2022, summarizes the distinction: “With df you can quickly see an overview of how much space is used on a disk and with du you can discover how much space is being used by specific directories.” Read the Linux Foundation article.
Rank #4
Why df and du totals may differ
The commands report different kinds of information, so their figures are not interchangeable. df reports filesystem-level capacity and availability; du estimates space from OS-reported information about files in the scanned hierarchy. Hard links, copy-on-write, compression, network filesystems, filesystem metadata, access restrictions, and mount paths can all affect what a scan accounts for.
If df shows little free space but a du scan does not reveal a matching amount of usage, first make sure you scanned the relevant mounted path and had permission to read the files. The remaining difference may reflect filesystem behavior or data outside the scanned hierarchy, rather than a contradiction between the commands.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
Command and version differences
The options described above follow GNU Coreutils documentation; GNU df and du may not be the versions installed on every Linux distribution. Other implementations or older releases can differ. If an option is unavailable, consult the local manual pages with man df or man du.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

