Linux commands: df
A quick guide to the `df` command, used to get disk usage information
The df
command is used to get disk usage information.
Its basic form will print information about the volumes mounted:
Using the -h
option (df -h
) will show those values in a human-readable format:
You can also specify a file or directory name to get information about the specific volume it lives on:
The df
command works on Linux, macOS, WSL, and anywhere you have a UNIX environment
→ I wrote 17 books to help you become a better developer, download them all at $0 cost by joining my newsletter
→ JOIN MY CODING BOOTCAMP, an amazing cohort course that will be a huge step up in your coding career - covering React, Next.js - next edition February 2025