一,指定端口
lsof -i:端口
netstat -tunlp |grep 端口
二、查看服务器所有端口
netstat -ntlp
三、查看某进程端口占用,例Tomcat
ps -ef |grep tomcat
sudo kill -9 端口
Laoye