![]()
windows cmd
netstat -aon | findstr "端口号"
然后在任务管理器关闭该PID的进程。
linux
netstat -anl | grep "端口号"
lsof -i:端口号
如果报错:-bash: lsof: command not found
安装一下yum install lsof -y即可
然后关闭该进程kill -9 pid
MAC
没有mac,俺也不知道,不过应该和Linux一样的命令。
参考文章
https://www.runoob.com/w3cnote/linux-check-port-usage.html
您可以选择一种方式赞助本站
赏