Rocky Linux

How to Install RPM Package on Rocky Linux 9

RPM, or Red Hat Package Manager, is an open-source and free package management system which is developed by Red Hat. This command line utility primarily manages the packages on Red Hat-based operating systems such as RHEl, CentOS, Fedora, etc. The RPM package is a collection of various files which uses the “.rpm” extension. Initially, the Red Hat-based Linux distros use the RPM packages. But nowadays, it is also used by Oracle and OpenMandriva Linux.

The RPM package allows the users to verify, install, update, query, and remove the RPM packages. If you want to install any package through RPM, this guide is for you. Here, you will get to know about the ways to install the RPM package on Rocky Linux 9.

How to Install the RPM Package on Rocky Linux 9

RPM packages include libraries and software packages such as networking tools (curl, wget), text editors (Vim, Nano), programming languages (Python, C++), and many more. All these packages are available in the RPM repositories. For example, we install the UNRAR using the RPM package.

To install the RPM package on Rocky Linux 9, you have to follow some basic steps which are as follows:

Step 1: Download the RPM Package File

First of all, whatever package you want to install, go to its official website and download that package file.

Here, we install UNRAR using its RPM package. Go to its official website and download its RPM package.

Step 2: Navigate the Directory

By default, the system saves the download files in the “Downloads” directory. Once the RPM package file is downloaded, go to the directory where your downloaded file is saved with the help of the following cd command:

cd ~/Downloads

Step 3: Install the RPM Package

Now, you can install the RPM package with the help of the following “dnf” command:

sudo dnf install <package_name>

Here, we use the following command to install UNRAR:

sudo dnf install unrar-6.1.7-1.el8.x86_64.rpm

Step 4: Verify the Installation (Optional)

To check whether your RPM package is installed successfully or not, run that package in the terminal.

unrar

You can see from the given output that UNRAR is installed in your system. This is how you can install the rpm package on Rocky Linux 9.

Conclusion

The administrators or users can easily manage the software installations through RPM packages. Linux distros commonly use the RPM package based on Red Hat such as Fedora, CentOS, etc. In this guide, we explained how to install the RPM package on Rocky Linux 9 based on Red Hat. Here, we installed the UNRAR command line utility through the rpm package.

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.