how to look port on mac 8080 code example Example: netstat listening port 8080 mac lsof -nP -iTCP:$PORT | grep LISTEN