Why Nostr? What is Njump?
2024-06-17 12:53:39

Julia Evans on Nostr: I think I finally figured out how to get a list of every port that any program is ...

I think I finally figured out how to get a list of every port that any program is listening on, on a Mac?

sudo lsof -iTCP -sTCP:LISTEN -iUDP -n -P

I kept seeing the advice to use `sudo lsof -i -P` but when I run that command it prints some stuff out and then hangs forever, which doesn't feel good.

Also on Linux I'd use netstat for this but it seems like BSD netstat is extremely different from GNU netstat and maybe can't do this at all?
Author Public Key
npub1ym9ddu2qh7rda8pxklq4gxw2kxhtm4cgvdvdy64z6agwy88nhuhqcnlm9y