Rocky Linux

How to Check the Disk Space on Rocky Linux

The storage space of an operating system is much more important than you think. If your system’s storage runs out of space, it becomes unstable and slow, leading to unexpected crashes. Hence, checking the disk space helps prevent your system from all these issues. You can remove unnecessary directories or files to free up the disk space and improve the system’s overall performance.

Although checking the disk space in Windows is simple, Linux has complex ways of doing it. If you are a Rocky Linux user and you don’t know how to check the disk space, this short tutorial is for you.

How to Check the Disk Space on Rocky Linux

We divided this section into two parts where we explain the different ways to check the disk space from both CLI and GUI approaches.

The Command Line Approach

There are a few commands you can use to check the disk space, so let’s take a look at all of them:

The Df Command

The “df” or “disk free” command displays the system’s free and used storage space. First, run the following command to display all the available options for the df command:

df --help

Now, let’s use the -h option with the df command to change the output into a more human-readable format:

df -h

Moreover, you can check the size of the specific directory by specifying the directory path in the command:

df -h /dev/sda1

The Du Command

The du or disk usage command shows the estimated disk space of the system. This command can check and identify large directories and files. First, please run the following command to display the help option:

du --help

Similar to the df command, you can also use the -h (human-readable format) option in the du command:

du -h

You can specify a directory’s path in the command to check the size of the particular directory:

du -h ./.cache/gnome-software/appstream

The GUI Approach

If you are not into commands, you can use the GUI tools to check the disk space through a simple UI.


GNOME Disks is a GUI tool that offers a simple interface to check and manage the disk storage. This tool shows the information about the total storage space, partition, used space and file system, etc. GNOME Disks comes as the default utility of Rocky Linux 9, but you need to install it through the following command:

sudo dnf update

sudo dnf install gnome-disk-utility

Once you are done with the installation, please run the following command to launch the GNOME Disks:



Baobab is a GUI disk space monitoring tool that you can use to display the overall used and available storage space. This tool displays the storage in a tree-like format to visualize everything cleanly. Moreover, Baobab has the filtering option to display the particular directories. You can install the Baobab in Rocky Linux 9 through the following command in the terminal:

sudo dnf update

sudo dnf install baobab

After installing Baobab, please launch it through the following command:



This tutorial is all about the ways on how you can check the disk space on Rocky Linux. In this tutorial, we explained the GUI and CLI approaches to check the available storage space. Hence, this tutorial is best suitable for all Rocky Linux users, whether you are a beginner or an experienced user. Furthermore, you can install the various additional commands, but using them might be confusing.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.