how to check which port is using 8080 mac code example Example: netstat listening port 8080 mac lsof -nP -iTCP:$PORT | grep LISTEN