$linuxjunkies
>

df(1)

Report file system disk space usage.

UbuntuDebianFedoraArch

Synopsis

df [OPTION]... [FILE]...

Description

The df command displays the amount of disk space used and available on file systems. By default, it shows usage for all mounted file systems. You can specify particular files or directories to see the usage of the file system containing them.

Output includes the total size, used space, available space, percentage used, and mount point for each file system. This is essential for monitoring disk capacity and preventing file system exhaustion.

Common options

FlagWhat it does
-hHuman-readable format (KB, MB, GB)
-kShow sizes in 1024-byte blocks (default)
-mShow sizes in megabytes
-gShow sizes in gigabytes
-iShow inode usage instead of block usage
-TInclude file system type in output
-aInclude all file systems, including dummy ones
-t TYPELimit output to file systems of type TYPE
-x TYPEExclude file systems of type TYPE
-PPOSIX output format (one line per file system)

Examples

Show disk usage for all mounted file systems in human-readable format

df -h

Show disk usage of the file system containing /home directory

df -h /home

Display disk usage with file system types (ext4, tmpfs, etc.)

df -T

Show inode usage instead of disk block usage

df -i

Display only ext4 file systems

df -t ext4

Show disk usage excluding tmpfs file systems in human-readable format

df -x tmpfs -h

Check disk usage for multiple specific mount points

df -h /var /tmp /home

POSIX format with human-readable sizes (useful for scripting)

df -Ph

Related commands