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

Why I stopped publishing blog posts as information provider

Now the AI can generate content. Does that mean the web publishing industry reaches the end? ChatGPT said: ChatGPT Not at all. While AI can ...