To check free disk space in Linux file system, you can use df
command which stands for “Disk Free”.
df
Command to See Free Disk SpaceIn the terminal, type df
. Below you can see a simple filesystem information:
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda 98760300 92042164 5698864 95% /
tmpfs 4071520 148 4071372 1% /dev/shm
In this case, the main disk is the /dev/sda
. Depending on machine and operating system, the path may vary.
df -h
For Human-Readable Format$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda 95G 88G 5.5G 95% /
tmpfs 3.9G 148K 3.9G 1% /dev/shm
1K-blocks
tells that there are approximately 99G of space totalUsed
tells that 92G is in useAvailable
tells that only 5.7G is freeUse%
is simply a percentage about the usageMounted on
tells where the filesystem is mountedThe other one tmpfs
is a temporary file storage which can be found in some Linux systems. It appears as a mounted file system, but data is stored in memory. When you are only interested in free disk space, you don’t have to pay attention to this at all.