Current location - Quotes Website - Team slogan - How to view and end occupied ports
How to view and end occupied ports
This article will introduce how to view and end occupied ports to help users manage network resources better.

Open a command window

Start-> run -> Cmd, or press window+R to bring up the command window.

View occupied ports

Enter the command: netstat -ano lists all ports. Watch the occupied ports in the list, such as 49 157, and find them first.

View PID

Check the PID corresponding to the occupied port, enter the command: netstat-aon | findstr "49157", press enter, and write down the last digit, that is, PID, here is 2720.

View process

Continue to enter tasklist | findstr "2720" and press enter to see which process or program occupies port 2720. The result: svchost.exe.

End process

Select a process in the task manager and click the "End Process" button, or enter: taskkill/f/t/im Tencentdl.exe in the command window of cmd.