Is there a way to quickly check the amount of free / used disk space in Ubuntu?
I would assume you could right click on 'file system' in the file browser and choose 'properties' or something but there is no such option.
Is there a way to quickly check the amount of free / used disk space in Ubuntu?
I would assume you could right click on 'file system' in the file browser and choose 'properties' or something but there is no such option.
Open System Monitor from Dash and select the Filesystems tab.
Or alternatively open a Terminal and type:
You can use
baobab
, or similar tools such askdirstat
orfilelight
, to see what files are using up your disk space.Baobab is also called
Disk Usage Analyzer
on Ubuntu.Here's a sample screenshot of
baobab
:Below is a sample screenshot of
filelight
:For a command line option, I prefer to use
ncdu
:You can drill into sub-folders to get total relative disk usage on the sub-folders. It's turtles all the way down. More nifty than
du -sh
on remote machines.If like me all you need is the total of disk space used then just use the following command.
Here's a sample output with the total shown at the end
I wrote a post about it: How Do I Find the Amount of Free Space on My Hard Drive with Command Line?
gnome-system-monitor
ordf -h
orlsblk
Other useful utilities are
baobab
.Free/used disk space is always related to a partition
First you need to decide which partition you are interested in.
In my case I am interested in the
/
since it has 98% in use. In other words it is nearly full.Now I use this command to see which files and directories contain the most bytes:
Above command can take some time. If you are really unlucky the result is too big for
/var/tmp
. Then you need an other destination. Maybe a temporary mounted usb memory stick.Here are the first lines of my result:
Why is
/var/log/bootchart
that big? .... That is an other question ...There are a number of ways to do this.
Enable the status bar in the View menu in Nautilus. This will place a bar at the bottom of all nautilus windows telling you the free space.
Use the File Systems System Monitor to view a list of all disks and their free space.
Use the Disk Usage Analyzer to get a listing of all directories on your system and how much free space they take up.
Go to any folder in nautilus and right click the background. Open the properties window to check the free space.
Run the command
df -h
.There's df information all over the net, but I like output that's simple and easy to read.
If you run
the bottom line in the output will give you exactly how much is left in your system, as well as how much is used etc.
The other option is to use
which will show it in one line as
All of this in gigabytes.
I mapped this to a shell command
dspace
and when I type that into terminal it instantly shows me my disk space usage.You can even write little shell commands that will monitor it and alert you if you get too low etc.
Another way! Right click on computer in Nautilus (file explorer) and click properties. It displays how much free and used space is on your hard drive.
I wrote a little hack for this with a command line and gui version. It's rather hard-coded, so may need some tweaks. Also, the gui version appears to use a proportional font that messes up the alignment of the displayed output. These scripts could be put in your path somewhere (like in $HOME/bin) and you can create an icon for the gui script on your desktop or panel.
Sample output:
Gui version:
New Gui Version with fonts fixed using yad
Using
dconf-editor
orgsettings
(sudo apt-get install dconf-tools
) you can enable the default behavior of the status bar.Type this on your terminal to enable the status bar by default
Type this on your terminal to disable the status bar by default
After that you will have the statusbar opened by default on Nautilus, no need to run anything else.