Solutions for Windows and Linux Port Occupancy

Windows:

insert image description here

#cmd:
netstat -aon|findstr "端口号"

insert image description here
insert image description here


Linux:

1、netstat -anl | grep "端口号"
2、lsof -i:端口号     #需要 root 用户的权限来执行
#终止进程的方式
kill pid

Guess you like

Origin blog.csdn.net/deng_xj/article/details/127504331