Rocky Linux

How to Install a Package on Rocky Linux 9

Rocky Linux 9 is a free and open-source enterprise operating system that is completely error-free when combined with Red Hat Enterprise Linux. Initially, Rocky Linux 9 was built to offer an alternative to CentOS. This Linux distro supports all the commands of CentOS. If you are a Linux beginner, you don’t know how to install a specific package from the command line. In this short tutorial, we will explain the commands to install a package on Rocky Linux 9.

How to Install a Package on Rocky Linux 9

Let’s start with the dnf command to install the specific package on Rocky Linux 9. For example, let’s install the nano editor through the dnf utility:

sudo dnf  install nano

Similarly, you can run the yum command in the terminal to easily install a package:

sudo yum install <package_name>

If you want to update the current package, you can run the following command:

sudo dnf update <package_name>

or

sudo yum update <package_name>

Finally, if you want to remove a package, use the “remove” option in the command to do it:

sudo dnf remove <package_name>

or

sudo yum update <package_name>

Conclusion

This is all you needed to know to install a package on Rocky Linux 9. We also included additional information, such as updating or removing the packages, so you don’t need to find anything else over the internet. Although we used the yum package utility for the installation, you can also use the dnf package utility.

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.