查询Linux某命令依赖哪个包


在Linux中,某些命令名称和rpm包的名称是不一样的,需要通过查询其依赖包进行安装。

CentOS:

比如ifconfig安装:
[root@192.168.138.150-mysql-master ~] # yum provides *bin/ifconfig Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * epel: my.mirrors.thegigabit.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com net-tools-2.0-0.25.20131004git.el7.x86_64 : Basic networking tools Repo : base Matched from: Filename : /sbin/ifconfig net-tools-2.0-0.25.20131004git.el7.x86_64 : Basic networking tools Repo : @base Matched from: Filename : /sbin/ifconfig

==========================================
[root@192.168.138.150-mysql-master ~] # yum -y install net-tools

 

  注:其它版本的linux系统可能有所不同。

    Centos系统还可以使用这个命令  # yum whatprovides */ifconfig


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM