Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AlexisDucastel/1df4efd6b4e8b0253edf0e67874a9283 to your computer and use it in GitHub Desktop.
Save AlexisDucastel/1df4efd6b4e8b0253edf0e67874a9283 to your computer and use it in GitHub Desktop.
List listening TCP ports on linux
cat /proc/net/tcp| cut -c -36|grep '0A$'| cut -c 16-19| while read line; do echo $((16#$line)); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment