DEV Community

Manish Chaudhary
Manish Chaudhary

Posted on

Tricks to get process id and terminate it in mac

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

Top comments (0)