Junk Food for the Brain

Open Source and Awesomesauce :)

2 CLI Ways to Determine Which Rpm Package Has a Program You Wish to Install in Fedora Linux

| Comments

There are 2 ways I know of to search for a particular program to install in Linux. As usual, I’ll be focusing on the Command Line Interface (CLI).

So, you’ve heard about the versatile port scanning tool called nmap and want to install it in Fedora Linux. The only problem is, you don’t know if it has been pre-packaged and is available as an rpm binary. No worries, all you need to do is search for using yum.

Use the yum search command.

yum search nmap

Based on its output, you know there are packages available, and all you need to do is yum install nmap

[raja@atreides ~]$ yum search nmap
Loaded plugins: fastestmirror, presto, refresh-packagekit
================================ Matched: nmap =================================
nmap.i586 : Network exploration tool and security scanner
nmap-frontend.i586 : the GTK+ frontend for nmap
onesixtyone.i586 : An efficient SNMP scanner
perl-Nmap-Parser.noarch : Parse nmap scan data with perl
psad.i586 : Port Scan Attack Detector (psad) watches for suspect traffic

Or, you might know that its called nmap, and want to search through you yum repositories to find if any of the available rpms have a file called nmap. To do that, use the `yum provides */ command. e.g.

yum provides */nmap

Look at what it gives:

[raja@atreides ~]$ yum provides */nmap
Loaded plugins: fastestmirror, presto, refresh-packagekit
2:nmap-4.76-4.fc11.i586 : Network exploration tool and security scanner
Repo        : fedora
Matched from:
Filename    : /usr/share/nmap
Filename    : /usr/bin/nmap

From this, you know that the nmap-4.76-4.fc11.i586 rpm contains these files, and by installing it, you get nmap.`