How to view ports under Windows by program

Source: Internet
Author: User

Sometimes when installing the program, the XX port is occupied, you can use the cmd command to see what the program occupies 1. Netstat-ano view the corresponding port corresponding program PIDFor example:
  1. C:\>netstat-ano
  2. Active Connections
  3. Proto Local Address Foreign address State PID
  4. TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 1760
  5. TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4
  6. TCP 0.0.0.0:2967 0.0.0.0:0 LISTENING 660
  7. TCP 0.0.0.0:3389 0.0.0.0:0 LISTENING 1712
  8. TCP 0.0.0.0:3934 0.0.0.0:0 LISTENING 728
  9. TCP 0.0.0.0:10700 0.0.0.0:0 LISTENING 4920
  10. TCP 10.186.20.116:21 0.0.0.0:0 LISTENING 272
  11. TCP 10.186.20.116:80 0.0.0.0:0 LISTENING 4516
You can see that the 21-port-occupied process PID is 272. 2. Tasklist view the corresponding PID number of the program
    1. TASKLIST/FI "PID eq pid"
Cases
    1. C:\>TASKLIST/FI "PID eq 272"
    2. Image name PID session name Session # Memory usage
    3. ========================= ====== ================ ======== ============
    4. ServUDaemon.exe 272 Console 0 3,980 K
3. If you want to release the port with the Tskill PID commandexample, if you want to release port 21
    1. Taskill 272


--the end--

Transferred from: http://blog.chinaunix.net/u2/88533/showart_1815741.html

How to view ports under Windows by program

Related Article

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.