1.lsof使用
lsof i: 端口号 or lsof i
2.netstat使用
netstat -tunpl | grep 端口号
netstat -anp | grep 端口号/PID
3.ps使用
ps -ef | grep 进程id(PID)
ps -aux | grep 程序名字/PID //查程序占用的所有端口
1.lsof使用
lsof i: 端口号 or lsof i
2.netstat使用
netstat -tunpl | grep 端口号
netstat -anp | grep 端口号/PID
3.ps使用
ps -ef | grep 进程id(PID)
ps -aux | grep 程序名字/PID //查程序占用的所有端口