查詢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