linux系统如何查看命令属于哪一个安装包

Debian:(Ubuntu等)

先安装apt-file

sudo apt-get install -y apt-file
apt-file update

查询命令:(已查询ifconfig为例)

root@debian ~ # apt-file search bin/ifconfig
net-tools: /bin/ifconfig

apt-file search -x(–regexp) 后可接正则表达式,如:

root@deepin ~ # apt-file search -x ‘bin/rzKaTeX parse error: Expected 'EOF', got '#' at position 36: … root@deepin ~ #̲ apt-file searc…
lrzsz: /usr/bin/rz

CentOS:

root@CentOS7 ~ # yum provides *bin/ifconfig
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

net-tools-2.0-0.22.20131004git.el7.x86_64 : Basic networking tools
Repo : @base
Matched from:
Filename : /sbin/ifconfig

作者:离尘zh
来源:CSDN
原文:https://blog.csdn.net/qq_26507799/article/details/78998439
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自blog.csdn.net/seaship/article/details/88837659
今日推荐