Skip to content
FLAVIO COPES
flaviocopes.com
2026

Linux commands: df

By Flavio Copes

Learn how the Linux df command reports disk usage for your mounted volumes, with df -h for human-readable sizes and a path to check the volume it lives on.

~~~

The df command is used to get disk usage information.

Its basic form will print information about the volumes mounted:

Terminal output showing df command listing mounted filesystems with raw numerical values for size, used, and available space

Using the -h option (df -h) will show those values in a human-readable format:

Terminal output showing df -h command displaying disk usage in human-readable format with GB and MB units

You can also specify a file or directory name to get information about the specific volume it lives on:

Terminal output showing df dev command displaying disk usage information for the specific volume containing the dev directory

The df command works on Linux, macOS, WSL, and anywhere you have a UNIX environment

Tagged: CLI · All topics
~~~

Related posts about cli: