How to Check Disk Space Usage on Ubuntu
Table of Contents
This tutorial explains how to show total disk space usage by an entire disk volume (also called a file system). This means that if two directories (for example,
/home/ubuntu/ are on the same disk volume, the output for the command described below will be the same).
To find out how much disk space a specific directory is using (the total size of all files and subdirectories in the directory), see this tutorial.
Step 1. Open a Terminal Session
If you're using an Ubuntu laptop or desktop, you can press
Ctrl + Alt + T on your keyboard to open a new terminal window. If you're using a remote Ubuntu server, you can connect using SSH to open a new terminal session.
To check disk space usage for the root volume mounted at
-h option tells the command to show "human friendly" output (using familiar units like Gi for Gibibytes/Gigabytes and Mi for Mebibytes/Megabytes).
df to show disk usage for the volume where
/ is located.
You should see output like:
To show usage for all disk volumes on your system, you can leave out the
To show usage for disks for specific paths, just add them to the end of the command. For example:
which should output: