I can see how much space using in Windows, since Ubuntu uses root concept, there is no particular hard drive any more. How can I tell how much space left using Ubuntu?


Command line

df -h


Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        46G  5,5G   38G  13% /
none            4,0K     0  4,0K   0% /sys/fs/cgroup
udev            2,0G  4,0K  2,0G   1% /dev
tmpfs           404M  1,3M  403M   1% /run
none            5,0M     0  5,0M   0% /run/lock
none            2,0G   23M  2,0G   2% /run/shm
none            100M   40K  100M   1% /run/user
/dev/sda6        23G  275M   22G   2% /home
/dev/sda7       289G   63M  274G   1% /data


Search in dash for "system" and choose "system monitor":

enter image description here


The problem with the other solutions is that they also list the files your have created and not only the space used by installed programs. For that I use something rather complex:

dpkg-query -W -f='${Installed-Size;8}' | xargs  | sed -e 's/\ /+/g' | bc

So, what's this supposed to do?

  • dpkg-query -W -f='${Installed-Size;8}' shows the size in Kibibytes of all installed packages.
  • xargs is to prevent that the next sed is applied to the last line.
  • sed -e 's/\ /+/g' replace any instance of space character with the plus sign
  • bc is a command line calculator. It takes 1234 + 12345 from the stdin and returns the result.



You can use the dedicated application called "Disk Usage Analyzer":

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.