Commands to Check Disk Space in Linux Systems


A quick way to get the summary of available and used disk space on your Linux system is to type in the ‘df’ command in a terminal window.

$ df

The command df stands for “disk filesystem“.

With the -h option (df -h) it shows the disk space in “human readable” form, which means, it gives you the units along with the numbers.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda9        38G   10G   26G  29% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            483M  4.0K  483M   1% /dev
tmpfs            99M  1.5M   97M   2% /run
none            5.0M     0  5.0M   0% /run/lock
none            493M   92M  401M  19% /run/shm
none            100M   52K  100M   1% /run/user
/dev/sda5        41G   32G  8.5G  79% /media/vineesh/E

The output of the df command is a table with six columns. The first column contains the file system path, which can be a reference to a hard disk or another storage device, or a file system connected through the network. The second column shows the capacity of that file system. The third column shows the current space usage, the third column shows available space, fifth column shows the usage in percentage and the sixth and last column shows the path on which that file system is mounted. The mount point is the place in the directory tree where you can find and access the that file system.

 $ du 

The ‘du’ command on the other hand shows the disk space used by the files and directories in the current directory. Again the -h option (df -h) makes the output easier to comprehend.

About Vineesh Mohan

A Technical Support specialist with strong customer service and good communication skills. I live in the city of Cochin, which known as the Queen of Arabian Sea.
Posted in CentOS, FreeBSD, Linux, Ubuntu