CentOS

How to Search for Package on CentOS 8

Packages are a collection of files that are used to carry out a specific task. It is responsible for the maintenance of software on Linux. To make it simple for understanding, the packages in Linux are like executable installers in windows.

When we install a Linux-based operating system package, it can remove, maintain, and add programs to the system.

As each computer running on Linux uses different kernels and software, the developers cannot guarantee that software will run smoothly across multiple devices. To fix this problem, packages have a list of programs (dependencies) that must be downloaded with software to ensure that it runs smoothly.

This article will discuss how to search and install a package on CentOS 8, but first, we will learn how to check and list already installed packages on CentOS 8 Operating system.

How to check and list Installed Packages

Some of the commands used below will only work in case you’re a root user or have sudo privileges.

You can use the command given below to list already installed packages on your CentOS 8 Operating system:

$ sudo dnf list --installed

You can see in the output; all the installed packages are listed out.

Some packages are installed in unknown repositories. You can use the command given below to list packages that are installed but in unknown repositories:

$ sudo dnf list --extras

However, if you want to search for some specific software in the installed packages list, you can filter out the results with the “gerp” command:

$ sudo dnf list installed | grep bzip2

In the command mentioned above, we are specifically searching for a package named “bzip2”.

If you want to list all the available packages, you can also list them by executing the following command:

$ sudo dnf list --available

Similarly, if you want to list all the packages that require upgrades, you can do so by using the list command with –upgrades option:

$ sudo dnf list --upgrades

If there are any, all the upgradable packages will list out.

Searching for Packages to install

There are two methods we can use to search for packages to install.

  • The first method is to use the terminal to look for packages that you have to install.
  • We can use the other method to install packages by using the pre-installed GUI “Software” utility.

Because sometimes you might not be able to find the right package name by using the terminal, the GUI “Software” utility comes in handy in such a scenario. It is very easy and user-friendly.

Search for packages in CentOS 8 through Terminal

Using the terminal to search for packages that you want to install on your system is the most convenient method as it just needs one command to initiate and complete the whole process.

What is DNF?

Dnf is the default CentOS 8 package manager. Package managers are package-management systems that automate the process of installing, updating, and configuring packages in an operating system.

For searching the packages in CentOS 8, use the “dnf search” command followed by the name of the software you want to install:

$ sudo dnf search [package-name]

After executing the above command, you will get a long list of all the available software versions for download.

Search for the version you need to install and note its name.

After finding the correct version, use the command given below to install the package using the DNF package manager:

$ sudo dnf install [package-name]

Remember to replace “package-name” with the actual name of the package.

Search for packages through GUI Software utility in CentOS 8

You can also search for packages through the user-friendly GUI software utility. Open the activities menu from the top left corner of your desktop.

Now open “software” from the menu on the left.

Here you can explore and search for any packages.

You also have the option to check installed packages and the packages that require updates.

Now we will install a package named “Rhythmbox” as an example using GUI. To search for “Rhythmbox”, click on the search icon in the top right corner of the application:

A search box will appear; type “Rhythmbox” in the search box:

The “Rhythmbox” will show up as a result. Click on it, and the detailed installation page for installing Rhythmbox will open up.

You can click on the install button to begin installing Rhythmbox on CentOS 8, as shown in the screenshot attached above.

Search for Packages using the Internet

If you’re unable to find the correct name of the package you want to install, then you can search the internet for it. You can visit websites like pkgs.org to find Linux packages. Pkgs.org keeps the data of many Linux packages of different Linux distros.

Conclusion

This article learned what packages are and how we can search and install packages on the CentOS 8 Operating system. We also learned how to find the list of already installed packages and upgrade them on the CentOS 8 Operating system.

About the author

Shehroz Azam

A Javascript Developer & Linux enthusiast with 4 years of industrial experience and proven know-how to combine creative and usability viewpoints resulting in world-class web applications. I have experience working with Vue, React & Node.js & currently working on article writing and video creation.