How do I Find the Amount of Free Space on My Hard Drive?


In Linux, the hard drive is critical for storing data and system files. The available space on the hard drive is crucial for the proper functioning of the installations, file storage, system updates, and overall system performance.

If you keep track of the free disk space on Linux, you can easily optimize, i.e., stability, file storage, performance, updates, backups, and logging. Adequate space ensures reliable operation, enables users to save and manage files, and maintains system performance by facilitating efficient swapping. It allows for successful system updates and backups and supports the generation and storage of important log files.

This post will enlist the possible methods and the steps to find the amount of free space on the hard drive of a Linux system. The commands provided in this post are practically demonstrated on Ubuntu 22.04.

How do I Find the Amount of Free Space on My Hard Drive?

The amount of free disk space can be checked on a Linux system using the df command and various GUI tools, i.e., the file manager of the Linux system and the gnome-system-monitor. These GUI tools are limited to the distributions that have the GUI installed. Let’s dig into these methods one by one:

Method 1: Using the df Command

The df command in Linux displays information about file system disk usage, including the amount of free space available. It offers various flags to get the output in the desired manner.

To check the free space on the hard drive, open the terminal and use the df command with its “-h” flag. The “-h” flag will show the output in the human-readable format:

$ df -h

How do I Find the Amount of Free Space on My Hard Drive? | linuxgenie.net

The “Avail” column indicates the free disk space available on each file system or partition.

Method 2: Using the File Manager

This method applies to systems having a file manager. For instance, the Nautilus for Ubuntu 22.04. Open the File Manager and navigate to the location where the storage device is displayed, i.e., in the case of Nautilus, click on the Other Locations from the side panel.

Once the directory is opened, find the used and available spaces parallel to the Computer. Right now, the 25.7GB total is free on my hard drive:

How do I Find the Amount of Free Space on My Hard Drive? | linuxgenie.net

Method 3: Using the System Monitor

A system monitor is a software tool or utility that provides real-time information and statistics about various aspects of a computer system. It can provide information on disk space alongside resource usage, performance metrics, and system health. For instance, Gnome System Monitor is used in GNOME-based desktop environments.

Prerequisites: Install GNOME-System-Monitor

As discussed, the GNOME system monitor is equipped with GNOME-based desktop environments. Because of its wide usage, the GNOME System Monitor is also widely used on other Linux systems. Use the following commands to acquire it as per your Linux distributions:

$ sudo dnf install gnome-system-monitor   #Fedora
$ sudo yum install gnome-system-monitor   #CentOS/RHEL
$ sudo pacman -S gnome-system-monitor     #Arch

Example

Launch the gnome-system-monitor from the terminal using the command:

$ gnome-system-monitor

Once it is launched, go to the File Systems tab, and you will get the storage and all relevant details with progress bars. Now, if you see, there is a column named “Available,” which represents the free space on each storage device.

How do I Find the Amount of Free Space on My Hard Drive? | linuxgenie.net

Alternative Methods: Use the du Command

The du -h command represents the disk usage of the files/directories on the system. You can get the idea of your free space by subtracting it from the total space. The output of the du -h command is as follows:

$ du -h

How do I Find the Amount of Free Space on My Hard Drive? | linuxgenie.net

Wrap Up

The amount of free space on your hard drive can be found by using the df utility (disk free), the file manager of the system, or the gnome-system-monitor. All these methods apply to all Linux distributions, while the operations and features could differ in the file manager’s method.

While using a Linux system, keep an eye on the amount of free space on your system, as this helps avoid various disk space-related issues. This post has presented all the possible methods to find the amount of free disk space on Linux.

Keep visiting Linux-Genie for more tips and tricks on the Linux system.

Print Friendly, PDF & Email
Categories