OSX - Find process by port and terminate it
lsof -i :<PORT>
kill -9 <PID>
for example, you have active tomcat process that run using default conf, and want to stop it.
# find the process
lsof -i :8009
COMMAND PID FD TYPE DEVICE SIZE/OFF NODE NAME
java 10373 66u IPv6 0x574a054ac035b4d1 0t0 TCP *:8009 (LISTEN)
# terminate the process
kill -9 10373
source : How to find the process that is running on a given port in OSX
Written by Noval Agung Prayogo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Osx
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#