Kill a process by it’s port

terminal-glossy.jpg

Have you ever faced problem of busy ports?

Here is the solution to kill a process which is occupyingh any specific port.

/usr/sbin/lsof | grep | kill -9 `awk ‘{print $2}’`

If you want to kill a proces who is using a port say 9999, issue command:
/usr/sbin/lsof | grep 9999 | kill -9 `awk ‘{print $2}’`

Related Posts

Comments are closed.