Ubuntu – How to find out how much disk space is remaining

command linediskdisk-usageserver

What is the command to find out how much disk space is being used/remaining?

Best Answer

You can use two commands: df and du.

df - report file system disk space usage

Usage works like such:

df -h

Which should output something like this:

Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs              20G  3.5G   16G  18% /

The -h flag provides human readable output (which makes reading of the output - easier).

du - estimate file space usage

A second tool is with du which is a slower approach but will give you a better break down of a per directory. Information on that can be found in How to determine where the biggest files/directories on my system are stored?

Related Question