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