How do I install ss on OS X? I couldn't find the iproute package in homebrew.
Red Hat recommends ss over netstat in Red Hat Enterprise Linux 7. ss is provided by the iproute package.
How do I install ss on OS X? I couldn't find the iproute package in homebrew.
Red Hat recommends ss over netstat in Red Hat Enterprise Linux 7. ss is provided by the iproute package.
It's possible to use lsof
to obtain most information provided by ss
e.g. This command will list network connections (-i
), showing IP addresses and omitting any DNS lookups (-n
) and showing TCP/TPI info:
lsof -i -n -Tf
Also netstat
provides similar info.
ss is not ported to macos right now as far as I now. (It is also not inclided https://github.com/brona/iproute2mac -> see issue #20 for details: https://github.com/brona/iproute2mac/issues/20)
But I think you can still use netstat on macOS or what feature is missing there ?
netstat
command has been deprecated for at least 10 years by now (as well as ifconfig
for example). They were developed by BSD for their IP stack a few tens of years ago, anything new is missing in them. See for example https://unix.stackexchange.com/a/387406/
– Paolo42
May 09 '21 at 19:21
In order to get ss
, you would need to get the source code for iproute
. Since you mention Red Hat linux, go onto a linux machine running Red Hat, and run the following command:
sudo yum source iproute
Now, copy over the source code to your Mac, and compile it.
You could also go on the Red Hat packages site and get the source tarball.
Note: I have not tested this, but this is the normal way to get source code.
iproute2
relies on functionality in the Linux kernel. There is https://github.com/brona/iproute2mac but it's not clear if that will get you ss.
– Ben Creasy
Jul 30 '17 at 16:31
#include <linux/....> Also see brew list iproute2mac, which contains only the
iptool, not
ss`. Don't have rep to down-vote, but would have done so: this is an Apple stackexchange site, OP merely quotes a red hat web site, and, even if they had asked about red hat, the answer still is not relevant to this audience.
– Jack Wasey
Oct 01 '20 at 07:23
ifconfig
is deprecated and will be removed from most Linux distribution defaults, it makes sense that someone would want theip
commands to enforce good habits.brew install iproute2mac
as suggested at https://superuser.com/a/898971/457084 gets you closer – Ben Creasy Jul 30 '17 at 16:43