yum 如何判断某个命令在哪个包中
2022/8/30 5:24:03
本文主要是介绍yum 如何判断某个命令在哪个包中,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
场景
当我们希望安装 wget 命令,而包的名字也是wget,这时使用yum install wget即可,很多软件安装包均是如此。但也有很多不同,比如 nslookup 命令所在的包就是 bind-utils ,安装包名就不同,实际上 yum 提供了很多命令可以进行搜索,比如 yum provides 或者 yum whatprovides。
yum provides 和 yum whatprovides 很类似,因此这里只介绍 yum provides。
查询 nslookup 所在的安装包:
[root@host1 golang]# yum provides nslookup Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.ustc.edu.cn * extras: mirrors.ustc.edu.cn * updates: mirrors.ustc.edu.cn WANdisco-git/7/x86_64/filelists_db | 172 kB 00:00:01 base/7/x86_64/filelists_db | 7.2 MB 00:00:01 extras/7/x86_64/filelists_db | 277 kB 00:00:00 updates/7/x86_64/filelists_db | 9.4 MB 00:00:01 32:bind-utils-9.11.4-26.P2.el7.x86_64 : Utilities for querying DNS name servers Repo : base Matched from: Filename : /usr/bin/nslookup 32:bind-utils-9.11.4-26.P2.el7_9.2.x86_64 : Utilities for querying DNS name servers Repo : updates Matched from: Filename : /usr/bin/nslookup 32:bind-utils-9.11.4-26.P2.el7_9.3.x86_64 : Utilities for querying DNS name servers Repo : updates Matched from: Filename : /usr/bin/nslookup 32:bind-utils-9.11.4-26.P2.el7_9.4.x86_64 : Utilities for querying DNS name servers Repo : updates Matched from: Filename : /usr/bin/nslookup 32:bind-utils-9.11.4-26.P2.el7_9.5.x86_64 : Utilities for querying DNS name servers Repo : updates Matched from: Filename : /usr/bin/nslookup 32:bind-utils-9.11.4-26.P2.el7_9.7.x86_64 : Utilities for querying DNS name servers Repo : updates Matched from: Filename : /usr/bin/nslookup 32:bind-utils-9.11.4-26.P2.el7_9.8.x86_64 : Utilities for querying DNS name servers Repo : updates Matched from: Filename : /usr/bin/nslookup 32:bind-utils-9.11.4-26.P2.el7_9.9.x86_64 : Utilities for querying DNS name servers Repo : updates Matched from: Filename : /usr/bin/nslookup [root@host1 golang]#
可以看到,nslookup 命令在 bind-utils 包中,因此需要使用 nslookup 命令就得安装 bind-utils 包:
yum install -y bind-utils
本文转载自:YUM基础:如何判断某个命令在哪个包中_淼叔的博客-CSDN博客_yum 查看命令属于哪个包
这篇关于yum 如何判断某个命令在哪个包中的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-15鸿蒙生态设备数量超8亿台
- 2024-05-13TiDB + ES:转转业财系统亿级数据存储优化实践
- 2024-05-09“2024鸿蒙零基础快速实战-仿抖音App开发(ArkTS版)”实战课程已上线
- 2024-05-09聊聊如何通过arthas-tunnel-server来远程管理所有需要arthas监控的应用
- 2024-05-09log4j2这么配就对了
- 2024-05-09nginx修改Content-Type
- 2024-05-09Redis多数据源,看这篇就够了
- 2024-05-09Google Chrome驱动程序 124.0.6367.62(正式版本)去哪下载?
- 2024-05-09有没有大佬知道这种数据应该怎么抓取呀?
- 2024-05-09这种运行结果里的10.100000001,怎么能最快改成10.1?