df
See how much disk space there is
What it does
df -h lists every mounted file system: its size, how much is used and free, how full it is in percent, and where it is mounted (/ is the system root). -h shows sizes in readable units instead of blocks.
When a disk fills up to 100%, services start to fail: databases cannot write and logs break off. That makes df -h one of the first commands to run when "everything broke". du helps find what takes the space.
Syntax
df -h
df -h <folder>Examples
See how much disk space is used and free
df -hsame as:
df --human-readabledf— disk free — space on disks-h— in GB and MB
Related commands
- du — Find out how much space a folder takes
- free — See how much memory is used and free
- journalctl — Read the logs of services and the system