ipconfig
, netstat
等网络命令在最新的 Linux 上已经被废弃, 取而代之的是新的网络工具包 iproute2
。新的命令和旧工具之间的对应关系如下:
Legacy utility | Replacement command | Note |
---|---|---|
ifconfig | ip addr, ip link | Address and link configuration |
route | ip route | Routing tables |
arp | ip neigh | Neighbors |
iptunnel | ip tunnel | Tunnels |
nameif, ifrename | ip link set name | Rename network interface |
ipmaddr | ip maddr | Multicast |
netstat | ss, ip route | Show various networking statistics |
brctl | bridge | Handle bridge addresses and devices |