查看所有端口 (tcp,udp)
netstat -an
windows 通用命令
查端口是否被使用
netstat -an | findstr 8000netstat -an | grep :
Linux 中, 强烈推荐, 同时查看端口和服务名称
只查看 tcp 端口 :netstat -lntp
只查看 udp 端口: netstat -lnup
来源: http://www.bubuko.com/infodetail-2575715.html