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.
We divided this section into two parts where we explain the different ways to check the disk space from both CLI and GUI approaches.
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” 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:
Now, let’s use the -h option with the df command to change the output into a more human-readable format:
Moreover, you can check the size of the specific directory by specifying the directory path in the 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:
Similar to the df command, you can also use the -h (human-readable format) option in the du command:
You can specify a directory’s path in the command to check the size of the particular directory:
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 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 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.