To get the process id running the port lsof -i :port_number lsof -i :port_number -P -n To terminate the process kill PID kill -9 PID