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 have an app running (let's call it MySpecialWebServer.app). While I have a GUI way to find out what port it's listening for requests on, I'd like to find out using the command line. I really have no idea how to go about it :)

Thanks

share|improve this question

1 Answer 1

up vote 2 down vote accepted
lsof -i

will show you a list of all open connections.

lsof -i | grep LISTEN

will show you a list of all ports being listened on. The left most column indicates the process listening.

share|improve this answer

Your Answer

 
discard

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.