Wednesday, March 21, 2018

How to find which apps have listening ports open on Mac OS X

The darwin version of netstat on Mac OS X is derived from BSD. The flag system is different than the netstat you used on linux command line. One of the noticeable difference is -p flag is not used to find the process id.
On Mac OS X,  the following two lines work best to show which apps have listening ports open, and tunnel:

netstat -Watn | grep LISTEN
lsof -Pnl +M -i -cmd | grep LISTEN

No comments:

Post a Comment

meta.ai impression

Meta.ai is released by meta yesterday, it is super fast you can generate image while typing! You can ask meta.ai to draw a cat with curvy fu...