Finding and killing processes using ports

First, run

sudo netstat -lpn | grep port_number

This will return a process name and id, such as

unix  2      [ ACC ]     STREAM     LISTENING     121704   5006/gnome-session  /

Kill the process per the PID, in this case 5006.

sudo kill -9 5006

Advertisements