How to check whether the port number is occupied and which application is occupied under windows

In the recent work process, I often encounter the situation that the port is occupied. When using IDE programming, I often have to change the port, which is very troublesome; sometimes there are some inexplicable errors during programming, and finally it turns out that the port is occupied, so I just Summarized the search methods for occupied ports under Windows, and recorded them to facilitate future inquiries. I also hope to be helpful to everyone.

  1. Open the DOS window, and enter the netstat -aon|findstr "8099" command in the window to view the PID corresponding to the port number 8099. From the
    write picture description here
    above figure, you can see that the PID corresponding to the port number is 8984.
  2. To end the process with PID 8984, you can open the task manager, as shown in the following figure:
    write picture description here
    It is OK to end the process directly in the task management.
  3. Another way is to end the process by command, taskkill /f /t /im Go-Goal3.0.exe
    write picture description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325558956&siteId=291194637