How do I kill the process currently using a port on localhost in Windows?

后端 未结 20 2069
陌清茗
陌清茗 2020-11-22 11:37

How can I remove the current process/application which is already assigned to a port?

For example: localhost:8080

20条回答
  •  名媛妹妹
    2020-11-22 12:14

    I was running zookeeper on Windows and wasn't able to stop ZooKeeper running at 2181 port using zookeeper-stop.sh, so tried this double slash "//" method to taskkill. It worked

         1. netstat -ano | findstr :2181
           TCP    0.0.0.0:2181           0.0.0.0:0              LISTENING       8876
           TCP    [::]:2181              [::]:0                 LISTENING       8876
    
         2.taskkill //PID 8876 //F
           SUCCESS: The process with PID 8876 has been terminated.
    

提交回复
热议问题