Tuesday, December 12, 2017

Killing a process on Mac

If you are debugging with Xdebug on your Mac, the following terminal codes may work.
Which application is running on which port?
sudo lsof -i :9000 # checks port 9000
COMMAND PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
java     53 root   19u  IPv6                   0t0  TCP *:cslistener (LISTEN)
To kill the process with PID;
sudo kill 53