OSX Discover which ports an app is using?

1

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

Matt H.

Posted 2012-08-10T18:28:37.267

Reputation: 237

Answers

2

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.

Sean Goller

Posted 2012-08-10T18:28:37.267

Reputation: 371