Check diskspace in Linux CLI

There are plenty of tools with which you can check your disk space. However, Linux already has a built in function to show you just what you need to know. Open a terminal window and type:


You will see something like this (your output may be different, depending on how many partitions/harddrives/cdroms you have mounted):

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 78012484 17606992 56442660 24% /
/dev/hda1 101086 16400 79467 18% /boot
none 516808 0 516808 0% /dev/shm
/tmp 247919 7339 227780 4% /tmp

This one looks a bit unreadable, because size is represented in 1K-blocks, lets try to make it clean and more readable:

df -h

Now the size is represented by megabytes and gigabytes

Filesystem Size Used Avail Use% Mounted on
/dev/hda3 75G 17G 54G 24% /
/dev/hda1 99M 17M 78M 18% /boot
none 505M 0 505M 0% /dev/shm
/tmp 243M 7.2M 223M 4% /tmp

Source :

Posted in Linux and tagged , .

Leave a Reply