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

How can I get the current disk usage (in %) of my hard drive from the command line?

share|improve this question
Now I wonder if there's some commandline equivalent of kdirstat or baobab. – Ehtesh Choudhury Jun 6 '13 at 23:15… – belacqua Aug 8 '14 at 21:41
up vote 74 down vote accepted

By using the df command.

Here's an example output:

$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1            303537496  27537816 260580948  10% /
none                    950788       252    950536   1% /dev
none                    959516       232    959284   1% /dev/shm
none                    959516       388    959128   1% /var/run
none                    959516         0    959516   0% /var/lock

Also take a look at its manpage.

share|improve this answer
df -m will show things in megabytes, df -h will show you in the largest possible unit. – Oli Jan 11 '11 at 15:48
+1 I'm a huge fan of df -h. – Zoot Jan 11 '11 at 15:56
@Oli: But that won't change the percentage! Kidding, +1. ;) – htorque Jan 11 '11 at 15:59

ncdu works well from the command line. It's ncurses-based and interactive.

If you want more fine grained disk usage, you should take a look at the answers to

share|improve this answer
Good one. That's a great tool – Sebastian Sastre Jan 5 at 14:02
Thanks!!! I had always used du, this tool is terrific!!! – SuperMau Mar 12 at 7:41

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.