Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 5 down vote accepted

sudo lsof -i -P | grep -i "listen"

from here: http://juretta.com/log/2007/08/08/list_open_ports_on_your_machine_mac_os_x_/

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
add comment

The easy way is to use Little Snitch, but it's not free (although there is a trial version). http://www.obdev.at/products/littlesnitch/index.html

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
add comment

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.