加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

如何知道命令是由哪个服务提供的

发布时间:2020-12-16 01:44:19 所属栏目:安全 来源:网络整理
导读:[[email?protected] ~]# system-config-kickstart bash: system-config-kickstart: command not found... [[email?protected] ~]# yum whatprovides " system-config-kickstart " Loaded plugins: fastestmirror,langpacksLoading mirror speeds from cached

[[email?protected] ~]# system-config-kickstart
bash: system-config-kickstart: command not found...


[[email?protected] ~]# yum whatprovides "system-config-kickstart" Loaded plugins: fastestmirror,langpacks Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirror.its.sfu.ca * updates: mirrors.aliyun.com system-config-kickstart-2.9.7-1.el7.noarch : A graphical interface for making kickstart files Repo : base

当输入一个命令提示? command not found...

可以使用??yum whatprovides 来查找是由哪个软件包提供此命令;

如果命令以存在;可以用?yum whatprovides??来查找是由哪个软件包提供,还能知道路径

[[email?protected] ~]# yum whatprovides "ifconfig"
Loaded plugins: fastestmirror,langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.xtom.com
 * updates: mirrors.aliyun.com
extras/7/x86_64/filelists_db                                                        | 249 kB  00:00:01     
net-tools-2.0-0.22.20131004git.el7.x86_64 : Basic networking tools
Repo        : @anaconda
Matched from:
Filename : /usr/sbin/ifconfig

?

yum provides也可以查询出结果

[[email?protected] ~]# which "ifconfig"
/usr/sbin/ifconfig
[[email?protected]-server ~]# rpm -qf /usr/sbin/ifconfig
net-tools-2.0-0.22.20131004git.el7.x86_64

先用 which 查出命令路径

然后用??rpm -qf? 也可以指向软件包

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读