Windows-kills a process that consumes a port number

Source: Internet
Author: User

Windows does not, like Linux,unix, ps-ef the port and process number, and then kill the process directly based on the process number.

Windows kills the process according to the port number in three steps:

The first step is to find the process number based on the port number

C:\>netstat-aon|findstr "9050"

TCP 127.0.0.1:9050 0.0.0.0:0 LISTENING 2056

See, Port is occupied by process number 2056 process, continue to execute the following command:

The second step is based on the process number Find process name

C:\>tasklist|findstr "2056"

Tor.exe 2056 Console 0 16,064 K

It's clear that Tor is taking up your port.

The third step is to end tor.exe the process under Task Manager

Windows-kills a process that consumes a port number

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.