Yum – find out which RPM package provides particular file or command

what rpm provides a file in centos
Have you ever wondered how to find RPM package which contains particular script, application or command in your RedHat / CentOS or any other Yum / RPM based operating system? Have you ever needed to find the RPM package which provides some service or feature?

Yum package manager provides parameters to fast and easy search for particular files / features in Red Hat / CentOS RPM repositories:

[root@tuxfixer ~]# yum provides {package-name}
[root@tuxfixer ~]# yum whatprovides {package-name}

Example:

[root@tuxfixer ~]# yum whatprovides iostat
Loaded plugins: product-id, search-disabled-repos, subscription-manager
sysstat-10.1.5-4.el7.x86_64 : Collection of performance monitoring tools for Linux
Repo        : rhel-7-server-rpms
Matched from:
Filename    : /usr/bin/iostat

sysstat-10.1.5-7.el7.x86_64 : Collection of performance monitoring tools for Linux
Repo        : rhel-7-server-rpms
Matched from:
Filename    : /usr/bin/iostat

Once you know what RPM package provides sought command, feature, script or application, you can simply install it:

[root@tuxfixer ~]# yum install sysstat

Share on: Share on FacebookShare on Google+Tweet about this on TwitterShare on StumbleUponShare on LinkedInPin on PinterestBuffer this pageShare on TumblrDigg thisFlattr the authorShare on RedditShare on VKShare on Yummly
Liked it? Take a second to support tuxfixer.com on Patreon!
Hadoop Developer Training

Leave a Reply

Name *
Email *
Website