# man yum
provides or whatprovides
Is used to find out which package provides some feature or file. Just use a specific name or a file-glob-syntax wildcards to list the
packages available or installed that provide that feature or file.
在man手册中找到使用方法,使用provides或者whatprovides即可
[root@localhost network-scripts]# yum provides */iostat
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
pcp-4.3.2-12.el7.x86_64 : System-level performance monitoring and performance management
Repo : test1
Matched from:
Filename : /var/lib/pcp/config/pmlogconf/tools/iostat
sysstat-10.1.5-19.el7.x86_64 : Collection of performance monitoring tools for Linux
Repo : test1
Matched from:
Filename : /usr/bin/iostat
找到自己想要的包,直接安装即可
本文介绍了如何在Linux系统中使用`yum provides`或`whatprovides`命令来查找哪个包提供了特定的功能或文件。通过示例展示了如何查询提供`iostat`工具的包,结果显示`pcp`和`sysstat`两个包分别在不同的repository中提供了该功能。了解这一方法有助于准确安装所需软件。
2151

被折叠的 条评论
为什么被折叠?



