这里以查看netstat命令所属的软件包为例。
CentOS:利用yum provides命令
netstat命令所属的软件包为net-tools
[root@CentOS7 ~]# yum provides netstat
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base:
* extras:
* updates:
net-tools-2.0-0.17.1004git.el7.x86_64 : Basic networking tools
源 :@anaconda
匹配来源:
文件名 :/usr/bin/netstat
Ubuntu:利用apt-cache search命令
netstat命令所属的软件包为net-tools
root@Ubuntu1604:~# apt-cache search netstat
net-tools - NET-3 networking toolkit
gnome-nettool - GNOME 的网络信息工具
bwm-ng - small and simple console-based bandwidth monitor
libparse-netstat-perl - module to parse the output of the "netstat" command
netstat-nat - tool that display NAT connections