$ 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