luoluo牛再一次给我展示了他强大的linux能力,现总结下netstat的用法。 首先,看下netstat的man page: NAME netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships 可以看到,netstat命令可以打印网络连接、路由表、接口统计、伪装链接和多播成员。 SYNOPSIS netstat [--all|-a] [--numeric|-n] [--tcp|-t] [--udp|-u] [--listening|-l] [--program|-p ] [--statistics|-s] [--help|-h] 参数解释: netstat -a : 显示所有连接中和等待中的socket状态 netstat -n : 显示网络状态时,以数字表示地址(如localhost表示成127.0.0.1) netstat -s : 按网络协议分类展示网络统计 netstat -t : 显示TCP协议网络状态 netstat -u : 显示UDP协议网络状态 netstat -p : 显示进程名 常用组合: 1.netstat -an (Listing all the