Quantcast
Channel: 看得透又看得远者prevail.ppt.cc/flUmLx ppt.cc/fqtgqx ppt.cc/fZsXUx ppt.cc/fhWnZx ppt.cc/fnrkVx ppt.cc/f2CBVx
Viewing all articles
Browse latest Browse all 20483

Linux Networking Commands

$
0
0


在很多linux发行版中经典的 ifconfig 等命令不再预装,取而代之的是 ip 命令,该指令属于 iproute2 包。本文介绍一下常见的网络层/传输层命令。


`ifconfig’ Related

DeprecatedReplacement

ifconfigip a or ip addr

ifconfig <interface>ip a show dev <interface>

ifconfig <interface> add <address>[</mask>]ip a add <address>[</mask>] dev <interface>

ifconfig <interface> mtu <mtu>ip link set dev <interface> mtu <mtu>


`route’ Related

DeprecatedReplacement

routeip route

route add <dest> <gateway> [<netmask>]ip route add <dest>[/<mask>] via <gateway>

route get <dest>ip route get <dest>


`netstat’ Related


替换 netstat 的是 ss 命令,两个命令的参数几乎一样,这里就用作者常用的几个举例子。

DeprecatedReplacement

netstat -nltss -nlt

netstat -natss -nat


Viewing all articles
Browse latest Browse all 20483

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>