The objective is to provide the reader with information on how to check disk space on Ubuntu 18.04 Bionic Beaver Linux.

Operating System and Software Versions

  • Operating System: - Ubuntu 18.04 Bionic Beaver Linux


Privileged access to your Ubuntu System as root or via sudo command is required.


  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Other Versions of this Tutorial

Ubuntu 20.04 (Focal Fossa)


Check disk space from Graphical User Interface

The first tool we are going to discuss is Disk Usage Analyzer. Disk Usage Analyzer should already be installed on your system. In case you need to install it open up terminal and enter:
$ sudo apt install baobab
Start Disk usage analyzer - Ubuntu 18.04
Once installed, you can launch Disk Usage Analyzer by searching your Activities menu.

Looking for Linux Systems Analyst !

The UAF Geophysical Institute, is looking for an experienced Linux Systems Analyst to join their team of research cyber infrastructure analysts and engineers. LOCATION: Fairbanks, Alaska, USA


Check disk space usage of home directory or entire filesystem
After Disk Usage Analyzer starts choose whether you wish to check the disk space of your home directory or the entire file system.
Disk space usage of the entire root (
Disk space usage and visualizations of the entire root ("/") directory.
Start Disks check tool
Another, but rather more simplistic disk usage checker tool is called Disks. Start Disks from your activities menu.

Check disk space on Ubuntu 18.04 using disks tool.
After selecting the Hard Drive disk, the Disks utility reveals the information about the disk size and the amount of free disk space.

Check disk space from Command Line

The following list of commands will provide you with an information on how to check disk space on Ubuntu 18.04. First, we will use the du command to check for disk space usage of a single directory like for example our home directory /home/linuxconfig:
$ du -sh /home/linuxconfig
In case we are interested in the size of each directory within /home/linuxconfig we can execute:
$ du -h --max-depth=1 /home/linuxconfig
The same principle applies to checking the disk space usage of the entire root ("/") system directory. However, in this case we need to execute the command with administrative privileges using the sudo command and optionally redirect any error message to /dev/null so we do not pollute our output with unnecessary messages:
$ sudo du -sh / 2> /dev/null
Lastly, we will use the df command to check for any available free disk space in the system's /home directory:
$ df -h /home/
Check disk space usage and free disk space from command line on Ubuntu 18.04 Linux
Using du and df commands to check disk space usage and available free space on Ubuntu 18.04 Bionic Beaver Linux
FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
Get extra help by visiting our LINUX FORUM or simply use comments below.

Comments and Discussions