netstat -an 查看網絡端口

lsof -i :port,使用lsof -i :port就能看見所指定端口運行的程序,同時還有當前連接。

nmap 端口掃描