$ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:http 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:https 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:ms-wbt-server 0.0.0.0:* LISTEN
显示系统网络状态中的UDP连接信息:
$ netstat -nu
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 192.168.10.10:68 192.168.10.20:67 ESTABLISHED
显示系统网络状态中的UDP连接端口号使用信息:
$ netstat -apu
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 linuxcool:bootpc _gateway:bootps ESTABLISHED 1024/NetworkManager
udp 0 0 localhost:323 0.0.0.0:* 875/chronyd
udp6 0 0 localhost:323 [::]:* 875/chronyd