Home>Article>Operation and Maintenance> How to check port status in Windows?
How to check the port in Windows: 1. Use the "win r" key to open the "Run" window, enter the "cmd" command and press Enter to enter the command prompt; 2. Enter "netstat -ano in the cmd window "Command and press Enter to display all port occupancy status.
How does windows check the port to know which program is occupying the port, and then process it? Let me introduce it to you in this article.
Step 1. View all ports in Windows
Click Start in the lower left corner of the computer, then select the Run option to open the "Run" window (use the "win r" key to open), enter the [cmd] command to enter the command prompt. Then we enter [netstat -ano] in the window and press Enter, and all port occupancy status will be displayed. As shown in the figure:
Step 2. Query the specified port occupation
In the window, continue to enter [netstat -aon |findstr "prompted port"], for example, the port prompted by the editor is 2080, then the editor enters the command as [netstat -aon|findstr "2080"], and after pressing Enter, you can see the PID in the list, and then according to the PID Check the corresponding occupying program in the computer's task manager, and then close it.
Step 3. Query the progress corresponding to the PID
If after the above steps, we get the PID 2016, then we can enter the command [tasklist|findstr "2016"], the name displayed on the first line is the program name, so that we can understand the port occupied by that program.
Step 4. Then we enter the command [taskkill /f /t /im program name].
The above is the detailed content of How to check port status in Windows?. For more information, please follow other related articles on the PHP Chinese website!