Check the port occupancy and terminate the process under Windows

View port occupancy

Enter the command: netstat -ano on the command line to see a list of all ports.

netstat -ano|findstr 80 // 查找端口80

Find the line with the port number and find the corresponding PID. This PID is the ID of the process, through which you can find the program corresponding to the process.

Check the process where the occupied port is located

Enter the command on the command line: tasklist|findstr PID, you can see which program process it is.

tasklist|findstr 2736
ThunderPlatform.exe           2736 Console                    1     41,116 K

Terminate process

Instruction: taskkill /t /f /pid pidNumber

taskkill /t /f /pid 2736    // 通过pid号来终止此进程
taskkill /t /f /im ThunderPlatform.exe   // 通过映像名来关闭进程

Guess you like

Origin blog.csdn.net/m0_46521785/article/details/120340500