Find out which application occupying a port in OSX
Sometimes during Rails development, I will force the unresponsive server to stop by doing control + z
which could caused the server to occupy the 3000 port in the background.
Without having to restart the machine, we can use
lsof -i tcp:3000
which represents List Open Files. Then, find out the pid and kill it with SIGKILL.
kill -9 [pid]
Written by shinn
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#