zoukankan      html  css  js  c++  java
  • Windows下查看端口被程序占用的方法

     
    有时安装程序时,会出现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

  • 相关阅读:
    github fork项目后,代码更新
    UIScrollView的用法,属性
    调整屏幕亮度,调整字体大小
    iOS UIFont 字体名字大全
    ios 6以后,UILabel全属性
    oc中的各种遍历(迭代)方法
    判断app是否是第一次启动
    ios 显示代码块(show the code snippet library)
    ios 添加动画的方法
    添加app第一次启动页面
  • 原文地址:https://www.cnblogs.com/fjping0606/p/4428578.html
Copyright © 2011-2022 走看看