How to quickly find out which rpm package provides a command on Fedora Linux?

How to quickly find out which rpm package provides a command on Fedora Linux?

As an example, we want to find out which package provides the ping command.

You can quickly find it out by rpm:

$ rpm -qf `which ping`

It will give

iputils-20121221-2.fc19.x86_64

Alternatively, you can use yum:

$ yum provides `which ping`

It will give you something like this:

iputils-20121221-2.fc19.x86_64 : Network monitoring tools including ping
Repo        : fedora
Matched from:
Filename    : /usr/bin/ping



iputils-20121221-2.fc19.x86_64 : Network monitoring tools including ping
Repo        : @koji-override-0/$releasever
Matched from:
Filename    : /usr/bin/ping

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *