How to Check Used Disk Space in Linux via Terminal and SSH
Simple command can show used and available space on disk partitions of your computer or server with Linux system
To see the free disk space on Linux just use the command df . df means “disk free“, and serves to display the free and available disk space on Linux systems in the terminal. To show disk space in human-readable format add -h (df -h), and then you will see the space listed in MB and GB.
With this terminal command you can see the free disk space of your computer with Linux operating system, or of your server/host via SSH:
In the example in the following image the same terminal command was used in Putty for Windows system, via SSH to list the free space of a server with Debian system:
In the case of the example the main partition /dev/sda1 of 99 GB, has 51 GB used, and 44 GBs available, with a calculation of 54% used. As for the other partitions we can understand:
- tmpfs: refers to the temporary file system used by virtual memory. Don’t take it into account.
- udev: It’s also not a partition on a permanent hard drive, it’s a RAM Disk that stores information about devices and other system stuff.
- /dev/loop: a loop device, is a pseudo-device that makes a file accessible as a block device. Loops are on root, and use the same space as the main partition, so they don’t need to calculate space separately. It is very common to see the /dev/loop on Ubuntu systems.