Knowledge Base
How to check free space in Linux
Learn how to check free disk space on a Linux system using the df command.
Yaro
linux disk space df command system administration
How to Check Free Space in Linux
Connect to your service with ssh.
Step 2: Use the df Command
The basic syntax for the df command is:
df [option] [devices]
To see used and available space, you can use:
# df
Sample output:
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 396856 0 396856 0% /dev
tmpfs 414256 0 414256 0% /dev/shm
tmpfs 414256 36632 377624 9% /run
tmpfs 414256 0 414256 0% /sys/fs/cgroup
/dev/vda2 9496644 1788720 7205808 20% /
/dev/vda1 499656 165700 297260 36% /boot
tmpfs 82848 0 82848 0% /run/user/0
To check free space specifically, use:
# df -H /
Sample output will look like this:
Filesystem Size Used Avail Use% Mounted on
/dev/vda2 9.1G 1.8G 6.9G 20% /
Related Articles
Browse more articles in these categories.