Skip to content

Instantly share code, notes, and snippets.

@haeramkeem
Created April 12, 2022 01:02
Show Gist options
  • Save haeramkeem/283d3ab1a29874c810166a942a8ffb26 to your computer and use it in GitHub Desktop.
Save haeramkeem/283d3ab1a29874c810166a942a8ffb26 to your computer and use it in GitHub Desktop.
netstat examples
#!/bin/bash
# Check if given port is in use
netstat -an | grep ${PORT}
# Check all TCP listening port and its process name
netstat -nlpt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment