Introduction to viewing port occupancy in Windows environment

Source: Internet
Author: User
Tags port number


(1) Check that the port is occupied by that PID; method one: Targeted viewing port, using command

Netstat–ano|findstr "< port number >", as shown in the last column of PID. The port number in the figure is 1068, and the corresponding PID is 3840.

(2) View the name of the process that corresponds to the PID.
Find by command, tasklist|findstr "<pid >", that is, Tasklist|findstr 3840
Note: Open the command prompt--netstat-ano to see the native port open and the corresponding program.


Cases


Start--run--cmd Enter the command prompt input Netstat-ano you can see all the connected PID in the task Manager to find the program corresponding to this PID if the task Manager does not have the PID this item, you can select "View"-"Choose Column" in Task Manager


If we need to determine who's taking up our 9050 ports,

1. Windows platform

Execute under Windows command Line window:

C:>netstat-aon|findstr "9050"

TCP 127.0.0.1:9050 0.0.0.0:0 Listening 2016

Do you see that the port is occupied by a process number 2016 process, and continue with the following command:

C:>tasklist|findstr "2016"

tor.exe                      2016 console                  0     16,064 K

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.