netstat -an 查看网络端口

lsof -i :port,使用lsof -i :port就能看见所指定端口运行的程序,同时还有当前连接。

nmap 端口扫描