netstat -ntupl n表示不查询dns t表示tcp协议 u表示udp协议 p表示查询占用的程序 l表示查询正在监听的程序 查看那个进程占用了xxx端口 lsof -i:xxx 查看进程号为xxx的进程在哪里 ps -ef|grep xxx
ps -ef |grep 程序名 netstat -nltp |grep 端口号或服务名