linux中通过使用的命令查找需要安装的包名

本文介绍了如何在Linux系统中使用`yum provides`或`whatprovides`命令来查找哪个包提供了特定的功能或文件。通过示例展示了如何查询提供`iostat`工具的包,结果显示`pcp`和`sysstat`两个包分别在不同的repository中提供了该功能。了解这一方法有助于准确安装所需软件。

 # 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

找到自己想要的包,直接安装即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

工具人01

仗剑天涯,从你的打赏开始

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值