Start----> Run---->cmd, or the WINDOW+R key combination to bring up the command window
C:\Windows\System32 hold down SHIFT key to bring up the command window
Enter the command: Netstat-ano, which lists all port conditions. In the list we observe the occupied ports
View the PID of the occupied port, enter the command: Netstat-aon|findstr "49157", enter, note the last digit, such as: 2720
Continue entering Tasklist|findstr "2720", enter to see which process or program is taking up 2720 ports, the result is: Svchost.exe
Or we open the Task Manager, switch to the Process tab, in the PID column to see who the 2720 corresponding process is, if you do not see the PID column, such as:
Then we click on the view---> select column and click on the front of the PID (process identifier) to make sure.
So we see the PID of this column identification, look at the 2720 corresponding process is who, if not, we put the following show all users of the process front of the tick, you can see, the image name is Svchost.exe, the description is, the main process of Windows, Fully consistent with the above command view.
End the process: Select the process in Task Manager to click the "End Process" button, or in the cmd command window, enter: taskkill/f/t/im Tencentdl.exe.
Ways to end a process with a command:
1, with taskkill command
1.TASKKILL/IM Process Name
Example: Turn tomcat off with the Taskkill/im tomcat7.exe command.
2.taskkill/pid[Process Code]-T (end the process)-F (Force end of the process and all child processes)
Note: There are two ways to check the PID code of the process:
1. Use the tasklist command to isolate the PID code of the process at the command line
2. Check the PID in the view options in Task Manager
2, with WMIC process where name= "process name" call terminate this does not need to know the process of PID code
3, Ntsd-c q-p [PID Process Code]
Using lsof
Lsof-i: port number to see if a port is occupied
Port number occupies use life to view port number and kill process