Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I am new to Ubuntu and Linux in general. I am trying to determing what is taking so much disk space so I run the following command.

du / -h -d 2 | sort -hr

which outputs the following

7.3G    /
5.1G    /var
3.8G    /var/www
1.1G    /usr
635M    /var/lib
573M    /var/cache
570M    /lib
474M    /lib/modules
354M    /usr/share
308M    /usr/src
262M    /usr/lib
135M    /usr/bin
118M    /var/log

What does the first line of output mean? why or how could / (nothing?) be taking up 7gb of space?

share|improve this question
have you noticed if you add up all those values they equal 7.3G? – zeitue Feb 27 '14 at 5:20
@TaylorBioniks of course you mean all of the 1 level deep values. – John Chadwick Feb 27 '14 at 7:54
To complement the answers, your error lies in / (nothing?). In fact / contains everything. – Calimo Feb 27 '14 at 13:00
up vote 14 down vote accepted

Everything you see is under / so its the sum up value of everything :P

share|improve this answer
Thank you for explain it in diagrammatically i should have explain like this i am sure that this diagram will help any one to understand the scenario. – smn_onrocks Feb 27 '14 at 5:28
Need to give image citation – user13107 Feb 27 '14 at 7:21
Now I feel stupid, thank you for this, makes total sense. – kisonay Feb 27 '14 at 12:04

The numbers du gives are cumulative. I.e. it's the space taken up by everything in the directory plus everything underneath the directory. The number for / therefore is how much space all the files on the filesystem are taking.

If you don't want cumulative numbers, you can use du -S.

share|improve this answer
Understood. I was basically looking to see which root folders had the most space. Thank you for the response. – kisonay Feb 27 '14 at 12:05
@kisonay For that use Baobab or Filelight, two common disk usage analyzers (there are command line tools too). – Ramchandra Apte Feb 27 '14 at 15:17

Your Answer


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.