netstat -an | grep ":PORT_NUMBER"

  • Check if a local port is use