linux系統上某個端口被占用,如何解決?
1.找到占用的進程編號:
netstat -tulnp | grep :8000
2.強制殺死該進程
kill -9 80603
其他說明:
1.查找占用端口的進程,可以用:
lsof -i :8001
# 或者使用
netstat -tulnp | grep :8001
# 或者使用
ss -tulnp | grep :8001
2.殺死找到的進程:
kill 端口號
一般就可以,不行的話加-9強制
3.終止終端正在運行的程序的進程,用
ctrl + c