Thursday, 7 April 2011

How to find the free space available in your hard disk using command line?

We can easily find the free space in our hard disk using command line. Command line, once we master it, is a lot easier than using Graphical User Interface(GUI), especially in linux. In linux, we have different Desktop Environment(DE) like Gnome,KDE,XFCE,Enlightenment etc which may be using different GUI based programs to find this simple free disk space. It may even change from distro to distro. So if we came from an entirely different linux distro or DE we will have to search for the specific program to view the free disk space. So what is the simplest and universal solution? Yes, it is command line which available in all the linux distros and have the same command to perform a specific task. So let's find out how find the free space using command line.

 Type the following command in your terminal to view the free space.

  • df -h
It will show the  total size of the partition,used hard disk space, free hard disk space and place where it is mounted on. See the below image to get the full picture.

What if you want to view the free  space in a particular folder? Give the path of the file/directory of which you want to find the free space.

  • df -h /home/
This command will give you the free space in the directory /home/

Command line is simple and time saving.;)


  1. Wow ...great info. I hope it will works...Thanks and keep on sharing such information please..
    dropped hard drive

  2. nice post. helpful info!

  3. Disk space can be frees by using a tool whci is diskanalyzerpro. It can free disk space in mac and windows both.

  4. finding free disk space using command line is fine and i liked it

    1tb external hard disk