See what process is using a specific port

For Mac (if no netstat):

PORT=8080
sudo lsof -n -i4TCP:$PORT | grep LISTEN
sudo lsof -n -iTCP:$PORT | grep LISTEN
sudo lsof -n -i:$PORT | grep LISTEN

For Linux (if no lsof):

netstat -tulpn | grep $PORT

Leave a Reply