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

What is the command to find out how much disk space is being used/remaining?

share|improve this question
up vote 74 down vote accepted

You can use two commands. The first is to use df - which according to the Ubuntu Manpage:

df - report file system disk space usage

Usage works like such:

df -h

Which should output something like this:

Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs              20G  3.5G   16G  18% /

The -h flag provides human readable output (which makes reading of the output - easier).

A second tool is with du which is a slower approach but will give you a better break down of a per directory. Information on that can be found in How to determine where the biggest files/directories on my system are stored?

share|improve this answer

There are several good command line tools for reporting disk usage. Use the one that's most helpful to you:


$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              56G  4.4G   48G   9% /
none                  1.5G  256K  1.5G   1% /dev
none                  1.5G  472K  1.5G   1% /dev/shm
none                  1.5G  400K  1.5G   1% /var/run
none                  1.5G     0  1.5G   0% /var/lock
tmpfs                 1.5G  596K  1.5G   1% /var/log
tmpfs                 1.5G  8.0K  1.5G   1% /var/log/apt
/dev/sdb2             840G  579G  253G  70% /home

df is installed by default.


$ pydf
Filesystem  Size  Used Avail Use%                               Mounted on
/dev/sda1    55G 4437M   48G  7.9 [##.........................] /         
none       1506M  256k 1505M  0.0 [...........................] /dev      
/dev/sdb2   839G  578G  252G 68.9 [###################........] /home

Column headers are colored.


$ discus
Mount           Total         Used         Avail      Prcnt      Graph
/               55.02 GB      4.33 GB     50.69 GB     7.9%   [*---------]
/sys                0 KB         0 KB         0 KB     0.0%   [----------]
+onnections         0 KB         0 KB         0 KB     0.0%   [----------]
+rnel/debug         0 KB         0 KB         0 KB     0.0%   [----------]
+l/security         0 KB         0 KB         0 KB     0.0%   [----------]
/dev             1.47 GB       256 KB      1.47 GB     0.0%   [----------]
/dev/shm         1.48 GB       472 KB      1.48 GB     0.0%   [----------]
/var/run         1.48 GB       400 KB      1.48 GB     0.0%   [----------]
/var/lock        1.48 GB         0 KB      1.48 GB     0.0%   [----------]
/var/log         1.48 GB       596 KB      1.48 GB     0.0%   [----------]
+ar/log/apt      1.48 GB         8 KB      1.48 GB     0.0%   [----------]
/home          839.00 GB    578.13 GB    260.87 GB    68.9%   [*******---]
+infmt_misc         0 KB         0 KB         0 KB     0.0%   [----------]
+e/ak/.gvfs         0 KB         0 KB         0 KB     0.0%   [----------]

Column headers and progress bars are colored.


$ di
Filesystem         Mount              Mebis     Used    Avail %Used fs Type
/dev/sda1          /                56340.2   4436.7  49041.6  13%  ext4   
/dev/sdb2          /home           859138.9 592008.8 258401.8  70%  ext4   
tmpfs              /var/log          1511.2      0.6   1510.6   0%  tmpfs  
tmpfs              /var/log/apt      1511.2      0.0   1511.2   0%  tmpfs
share|improve this answer
excellent options. especially pydf and discus – Ubuntuser Jul 29 '12 at 22:11

You can use this command to find out how much space files in your home directory (replace ~/ with / for entire filesystem) and sort by largest files

du -sk ~/* | sort -n

share|improve this answer

df -h is your best bet (run it in the Terminal).

share|improve this answer

Try du -sh <dir>.

For example, du -sh /home/mark will show a summarised usage report in human-readable output for /home/mark.

share|improve this answer

Or if you prefer graphical gnome-system-monitor

share|improve this answer

Note tht df -h will show u only remaining space on Mounted Partitions. Suppose there are NTFS n FAT32 partitions too before running it note that mount all the partitions. If Ubuntu is sole OS on ur machine then i dnt c any prob with 'df'.

share|improve this answer

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.