How to kill a process on a port on ubuntu

前端 未结 27 2292
天涯浪人
天涯浪人 2020-12-02 03:05

I am trying to kill a process in the command line for a specific port in ubuntu.

If I run this command I get the port:

sudo lsof -t -i:9001
         


        
27条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 03:49

    the below command will kill your running port

    sudo kill -9 `sudo lsof -t -i:9001`
    

提交回复
热议问题