9

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?

Braiam
  • 67,791
  • 32
  • 179
  • 269
user3528144
  • 647
  • 2
  • 8
  • 15

3 Answers3

16

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

Rinzwind
  • 299,756
7

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:

Braiam
  • 67,791
  • 32
  • 179
  • 269
  • And, according to this: https://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 '14 at 00:18
4

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

enter image description here