Life of a software developer

Quick Tip: Who is listening on given TCP port on MacOS?

For Big Sur and later:

sudo lsof -i -P | grep LISTEN | grep :$PORT

Where $PORT is the port you are looking for. Ex: 3306

Exit mobile version