Show total, used, available, and percentage usage for each mounted filesystem in human-readable units.
Which command is appropriate?
df -h shows Size, Used, Avail, Use%, and Mounted on for mounted filesystems using readable units.
Detailed explanation
df -hCorrect. df -h displays mounted filesystem capacity and usage.
du -hIncorrect. du summarizes files and directories within a tree.
lsblk -bIncorrect. lsblk -b shows block-device sizes in bytes, not filesystem usage percentages.
free -hIncorrect. free -h reports RAM and swap usage.
Try it yourself
An example you can run in a temporary verification environment.
df -h | sed -n '1,6p'Expected result
Filesystem、Size、Used、Avail、Use%、Mounted onの一覧Key points
- df is filesystem-level usage
- -h means human-readable
- du measures directory contents
Notes
- Environment: GNU coreutils df / 読み取り操作
- Prefer help or version output and a disposable device when testing storage commands.
- Formatting, repair, and mount changes can affect data or availability.
Foundation review
Place the operation
df answers filesystem capacity; du answers how a directory tree consumes it.
Check the side effect
Investigate deleted-but-open files when df and du disagree.