Windows下查看連接埠被程式佔用的方法

來源:互聯網
上載者:User

標籤:

 有時安裝程式時,會出現XX連接埠被佔用的情況,可以通過CMD命令查看什麼程式佔用 1. netstat -ano 查看相應連接埠對應程式的PID例如: 
  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  
可查看到佔用21連接埠的進程PID為272   2. tasklist查看相應的PID號的程式 
  1. tasklist /fi "pid eq PID"  
例, 
  1. C:\>tasklist /fi "pid eq 272"  
  2. 映像名                       PID 會話名           會話#       記憶體使用量  
  3. ========================= ====== ================ ======== ============  
  4. ServUDaemon.exe              272 Console                 0      3,980 K  
3. 如果要釋放該連接埠 用tskill PID 命令例,如要釋放21連接埠 
  1. taskill 272  


--The End--

轉自:http://blog.chinaunix.net/u2/88533/showart_1815741.html

Windows下查看連接埠被程式佔用的方法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.