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

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

    If you already know the port number, it will probably suffice to send a software termination signal to the process (SIGTERM):

    kill $(lsof -t -i :PORT_NUMBER)
    

提交回复
热议问题