Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 15 down vote accepted

Command line

df -h

Example:

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

Desktop

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

enter image description here

share|improve this answer

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.

References:

share|improve this answer
    
And, according to this: bugs.debian.org/cgi-bin/bugreport.cgi?bug=534408 the number returned should be the number of kibibytes for the installed size of all packages. A kibibyte = 1024 bytes. –  mkoistinen Apr 25 at 0:18
    
@mkoistinen nice, thanks. –  Braiam Apr 25 at 0:24

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

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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