Find out which applications are listening to which port on Mac OSX

September 11th, 2009 by nils

If you ever wonder which ports are open on your OS X machine, or whether e.g. jboss is still running, this command will help you:

$sudo lsof -Pi | grep -i "listen"

FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
Man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man