Yum: Search and Install

Yum is one of the easiest methods of installing packages on Red Hat and its variants. Here is a quick example of how to search and install a package.

We will be installing irssi today.

To search a package you simply use the search command.

[[email protected] ~]# yum search irssi  
Matched: irssi   
irssi-devel.i686 : Development package for irssi  
irssi-otr.i686 : Off-The-Record messaging plugin for irssi  
irssi-xmpp.i686 : XMPP plugin into irssi  
irssi.i686 : Modular text mode IRC client with Perl scripting  
ctrlproxy.i686 : ctrlproxy  
dvtm.i686 : Tiling window management for the console  
ekg.i686 : A client compatible with Gadu-Gadu  
purple-plugin_pack-pidgin.i686 : A set of plugins for pidgin  
xchat-otr.i686 : Off-The-Record messaging plugin for xchat

After you found the package you want install it.

[[email protected] ~]# yum install irssi
Loaded plugins: langpacks, presto, refresh-packagekit  
Adding en_US to language list  
Setting up Install Process  
Resolving Dependencies  
--> Running transaction check  
---> Package irssi.i686 0:0.8.15-3.fc14 set to be installed  
--> Finished Dependency Resolution  
Dependencies Resolved  
irssi i686 0.8.15-3.fc14 fedora 779 k  
Transaction Summary  
Install 1 Package(s)  
Total download size: 779 k  
Installed size: 2.3 M  
Is this ok [y/N]: y  
Downloading Packages:  
Setting up and reading Presto delta metadata  
Processing delta metadata  
Running rpm_check_debug  
Running Transaction Test  
Transaction Test Succeeded  
Running Transaction  

One of the best features of Yum is that it will resolve dependency issues for you and install additional packages, but only after asking nicely.

Benjamin Cane
Principal Engineer, Vice President

Benjamin Cane is Principal Engineer at American Express. He has more than 16 years of experience with roles in both systems and software engineering. He leverages both his systems and software skills to build end-to-end platforms. Platforms, purpose built for performance and resiliency. Benjamin is also the author of Red Hat Enterprise Linux - Troubleshooting Guide (2015, Packt Publishing), and he has published many popular articles on topics such as Linux, Docker, Python, Go and Performance Tuning. Thoughts and Opinions expressed in my articles are my own.