Posts Tagged ‘kill’

Kill a process by it’s port

Thursday, May 29th, 2008

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}’`