Window system cmd black window to view port occupancy, corresponding processes, and commands to kill processes

Visit my personal blog Autumn code personal blog
1. View the ports occupied by all processes
In Start-Run-cmd, enter: netstat –anoyou can view all processes
Write picture description here
2. View the programs that occupy the specified ports
When you use tomcat to publish programs, you often encounter When the port is occupied, we want to know which program or process occupies the port, we can use this command:

netstat -ano|findstr "8080"

Write picture description here
3. Use the command to kill the process
According to the above search, we already know its process number, use the command:

taskkill /PID 进程号 /F

Write picture description here

Guess you like

Origin blog.csdn.net/coco2d_x2014/article/details/77945409