端口占用情况查看:
netstat -alnp | grep 端口
netstat -alnp | grep 8125
lsof -i:端口号
lsof -i tcp:8125
netstat -tunlp | grep 端口号
根据进程查看端口
1、ps -ef | grep xxx(某个进程),可以查看某个进程的pid。
2、ps aux | grep xxx
2、再用netstat -anp | grep pid号,可以查看到该进程占用的端口号!
杀进程
kill -9 1252