how to know if a port is in use macos code example Example: port finding in macos $ lsof -nP -iTCP -sTCP:LISTEN | grep 8000