Home > Article > System Tutorial > How to check which program is occupying a port in Win7
Many friends who use the win7 system find that when they need to open a certain port, the system prompts that it is occupied. At this time, how do we check who is occupying the fail port? In fact, just check it in the command manager. Let’s take a look at the specific tutorials.
1. Start---->Run---->cmd, or window R key combination to bring up the command window
2. Enter the command: netstat -ano to list the status of all ports. In the list, we observe the occupied port, such as 49157, and find it first.
3. Check the PID corresponding to the occupied port. Enter the command: netstat -aon|findstr "49157", press Enter, and write down the last digit, which is the PID. This is 2720.
4. Continue to enter tasklist|findstr "2720", press Enter, and check which process or program occupies port 2720. The result is: svchost.exe
5, or we open the task manager, switch to the process tab, and check in the PID column who the process corresponding to 2720 is. If you cannot see the PID column, as shown below:
6. Then we click View--->Select Column, check the box in front of PID (Process Identifier), and click OK
7. In this way, we can see the PID column identification and see who the process corresponding to 2720 is. If not, we can check the box in front of the display process of all users below, and then we can see it. The image name is svchost.exe, and the description is, the main process of Windows, which is exactly the same as what is viewed by the above command.
8. End the process: Select the process in the task manager and click the "End Process" button, or enter in the cmd command window: taskkill /f / t /im Tencentdl.exe.
Run cmd as administrator>>>
What is the use of running as administrator >>>
The above is the detailed content of How to check which program is occupying a port in Win7. For more information, please follow other related articles on the PHP Chinese website!