Last active
February 22, 2023 14:29
-
-
Save nethoncho/161330e9538bbcfae783666c7eeaf230 to your computer and use it in GitHub Desktop.
Raspberry Pi Raspbian list open ports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -lnt | grep LISTEN | awk '{ print ( $4 ) }' | awk 'BEGIN{FS=":"} { print $(NF) }' | sort -n | uniq |
-l
already filters listening ports, so we can omit grep LISTEN
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🧡👍👏