lsof is not working for me on Mac OS X 10.13 – gives error, I’m trying to find process accessing a specific IP address

Posted on

Problem :

lsof isn’t working for me. I’m trying to use instructions in posts such as How do I find out which program and process ID accesses a given IP address in macOS? to find which process is accessing a specific IP address. But on OSX 10.13 it gives me:

% sudo lsof -i


lsof: unknown protocol name ( in: -i lsof 4.91 latest revision: latest FAQ: latest man page: usage: [-?abhlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]] [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [–] [names] Use the “-h” option to get more help information.

what am I doing wrong?

Solution :

According to the manual page for lsof(8), the syntax should be:

sudo lsof -i @

(Note the “@”.)

It’s possible the original Answer you were going off of had a typo, or perhaps the syntax for lsof(8) has changed.

Leave a Reply

Your email address will not be published.