To check free disk space in Linux file system, you can use
df command which stands for “Disk Free”.
dfCommand to See Free Disk Space
In 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 -hFor 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-blockstells that there are approximately 99G of space total
Usedtells that 92G is in use
Availabletells that only 5.7G is free
Use%is simply a percentage about the usage
Mounted ontells where the filesystem is mounted
The 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.