How to figure out which processes is listening on a port on OS X
sudo lsof -n -i4TCP:$PORT | grep LISTEN
- Replace
$PORT
with the port you are looking for - This only works with TCP ports.
- Prefixing with
sudo
will show proceses the current user does not own