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

后端 未结 20 2485
陌清茗
陌清茗 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

    With Windows 10 default tools:

    • Step one:

    Open Windows PowerShell as Administrator

    • Step two:

    Find PID (ProcessID) for port 8080:

    netstat -aon | findstr 8080
    

    TCP 0.0.0.0:8080 0.0.0.0:0 LISTEN 77777

    • Step three:

    Kill the zombie process:

    taskkill /f /pid 77777
    

    where "77777" is your PID

提交回复
热议问题