Is there an equivalent tool/shell command for Mac (preferably integrated with the OS) that has the functionality of the Windows command-line netstat -b -n
? (displays active network connections, with the application that created them and source/dest IP+Port)
Windows – Mac equivalent of `netstat -b -n`
command linemacoswindows
Best Answer
OS X has a
netstat
command, but it doesn't display information about the programs associated with the network connections. If you want to see that, you need to uselsof
instead. Note that it must be run as root (i.e. withsudo
) in order to see other users' programs:lsof
also has many options for controlling what's displayed:...see the man page for more.