Port number occupies use life to view port number and kill process

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.