0

I am trying to kill processes on port 80. Here are the process running on port 80

lsof -i tcp:80
COMMAND  PID    USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
nginx   6233    root   13u  IPv4 4216925      0t0  TCP *:http (LISTEN)
nginx   6235 opscode   13u  IPv4 4216925      0t0  TCP *:http (LISTEN)

I have tried killing processes using kill -9 <PID> but they still exist with PID changed. How can I kill the processes forcefully?

codec
  • 101

1 Answers1

0

Use the pkill command since you know the command name.

sudo pkill -f nginx

-f:

   The pattern is normally only matched against the process name.
      When -f is set, the full command line is used.
George Udosen
  • 36,677