Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I think I remember a command line utility that did this, but I can't remember what it's called and a few Google searches turn up nothing.

share|improve this question
up vote 6 down vote accepted
sudo lsof -i -P | grep -i "listen"  

from List open ports on your machine (Mac OS X).

It was the second google result for "list sockets mac osx"

You could grep tcp or udp instead to get outbound ports instead of listening ports.

share|improve this answer

The easy way is to use Little Snitch, but it's not free (although there is a trial version).

share|improve this answer
D'oh! Upvote for you... I have Little Snitch installed and I forget it had that capability, thanks. – esqew Jan 2 '11 at 1:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.