Skip to content

Instantly share code, notes, and snippets.

@jeffgreenca
Created April 22, 2016 15:12
Show Gist options
  • Save jeffgreenca/0c7e38a183cb56f255fce78e394c7597 to your computer and use it in GitHub Desktop.
Save jeffgreenca/0c7e38a183cb56f255fce78e394c7597 to your computer and use it in GitHub Desktop.
#/bin/sh
#List all listening ports and their bound IP
ss -lntu | awk '{print $5}' | awk -F ':' '{print $2, "(", $1, ")" }' | sort -n
#Lists just the ports
#ss -lntu | awk '{print $5}' | sed 's/^.*://' | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment