netstat
和lsof
都是linux下的工具,可以用于查看系统的网络状态。
netstat
-i
显示接口表,也就是eth0,wlan0这些
-r
显示路由表,和命令$route
显示的一样
-g
显示组播
$netstat -r
显示路由表,Flag的意思如下A Receive all multicast at this interface. B OK broadcast. D Debugging ON. M Promiscuous Mode. O No ARP at this interface. P P2P connection at this interface. R Interface is running. U Interface is up. G Not a direct entry.