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