How to Check Available Space on All Mounted File Systems Ubuntu
Managing disk space is crucial for maintaining a healthy Ubuntu system. This article explains how to quickly view the available space on all mounted file systems using standard terminal commands. You will learn the primary command used for this task, how to interpret its output, and optional flags to make the information more readable.
Use the df Command
The primary tool for checking disk space in Linux is the
df command, which stands for “disk free.” To see the space
usage on all currently mounted file systems, open your terminal and
enter the following command:
df -hThe -h flag is essential for readability. It stands for
“human-readable” and displays sizes in powers of 1024 (K, M, G, T)
instead of raw 1024-byte blocks.
Understanding the Output
When you run the command, the terminal will display a table with several columns. Here is what each section represents:
- Filesystem: The name of the disk partition or storage device.
- Size: The total capacity of the file system.
- Used: The amount of space currently occupied by data.
- Avail: The amount of space remaining for use.
- Use%: The percentage of the total space that is currently used.
- Mounted on: The directory path where the file system is accessible.
Checking Specific File Systems
If you need to check the space for a specific directory or mount point rather than all systems, you can append the path to the command. For example, to check the space available on your home directory, run:
df -h /homeThis filters the output to show only the file system containing that specific path. This method provides a quick and efficient way to monitor storage health without installing additional software.