Linux Disk Space Command
Df h shows disk space in human readable format df a shows the file system s complete disk usage even if the available field is 0.
Linux disk space command. The basic syntax is. Linux command to check disk space. Use it to display the amount of space used by your current directory.
This is the most basic command of all. The df command stands for disk free and shows available and used disk space on the linux system. The df command is the tool i first used to discover drive space on linux way back in the 1990s.
Bash contains two useful commands related to disk space. Filesystem 1k blocks used available use mounted on. Check disk space in linux with du command the du command displays disk usage.
This tool can display disk usage for individual directories in linux giving you a finer grained view of your disk usage. Linux check disk space with the du command. Fdisk fdisk is the most commonly used command to check the partitions on a disk.
You ll see a lot of output similar to the screenshot below. Type df and press enter in a bash terminal window to get started. Du du path do dir du options directories and or files.
This command has a few switches but for basic reporting you really only need one. Df can display free disk space. It s very simple in both usage and reporting.