最小安裝的CentOS,沒有netstat和ifconfig工具,稍微有點煩。我們可以通過yum install net-tools來安裝。
注意這兩個工具所在的軟體包跟他們的名字不一樣。
安裝netstat和ifconfig:
yum install net-tools
檢視net-tools包的資訊:
[[email protected] ~]$yum info net-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
Name : net-tools
Arch : x86_64
Version : 2.0
Release : 0.24.20131004git.el7
Size : 918 k
Repo : installed
From repo : base
Summary : Basic networking tools
URL : http://sourceforge.net/projects/net-tools/
License : GPLv2+
Description : The net-tools package contains basic networking tools,
: including ifconfig, netstat, route, and others.
: Most of them are obsolete. For replacement check iproute package.
net-tools包裡面,除了ifconfig,netstat,還有route等其它工具。