How do I find the amount of free space on my hard drive?

Is there a way to quickly check the amount of free / used disk space in Ubuntu?

I would assume you could right click on 'file system' in the file browser and choose 'properties' or something but there is no such option.


Solution 1:

Open System Monitor from Dash and select the Filesystems tab.

enter image description here

Or alternatively open a Terminal and type:

df -h

Solution 2:

You can use baobab, or similar tools such as kdirstat or filelight, to see what files are using up your disk space.

Baobab is also called Disk Usage Analyzer on Ubuntu.

Here's a sample screenshot of baobab:

baobab

Below is a sample screenshot of filelight:

filelight

For a command line option, I prefer to use ncdu:

ncdu

You can drill into sub-folders to get total relative disk usage on the sub-folders. It's turtles all the way down. More nifty than du -sh on remote machines.

Solution 3:

gnome-system-monitor or df -h or lsblk

Other useful utilities are baobab.

Solution 4:

If like me all you need is the total of disk space used then just use the following command.

df -h --total

Here's a sample output with the total shown at the end

Filesystem      Size  Used Avail Use% Mounted on
udev            478M     0  478M   0% /dev
tmpfs           100M  4.5M   95M   5% /run
/dev/vda1        20G  3.3G   16G  18% /
tmpfs           497M     0  497M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           497M     0  497M   0% /sys/fs/cgroup
tmpfs           100M     0  100M   0% /run/user/0
total            22G  3.3G   17G  17% -

I wrote a post about it: How Do I Find the Amount of Free Space on My Hard Drive with Command Line?