Current location - Quotes Website - Team slogan - How does windows view the process corresponding to the occupied port?
How does windows view the process corresponding to the occupied port?
1. Click Start-Run, enter cmd to open the command line interface, enter the command netstat-nao | findstar "XXXX" (note: xxxx is the port number you want to check, taking port 25340 as an example), and the usage of output port 25340. The specific corresponding lines are

Protocol local address external address? Status? PID

You can find that the PID of the service is 8060, and then query the corresponding process according to the PID.

2. If you want to find out which process a process is, you can use the tasklist command. The specific method is tasklist | findstr "8060" (note: 8060 is the process PID).

You can find that the openvpn client is occupying this port, and the task manager can directly end the task.