Skip to content

Instantly share code, notes, and snippets.

View intelltec's full-sized avatar

Kliment Grebenshchikov intelltec

View GitHub Profile
@intelltec
intelltec / my-external-ip.sh
Created September 20, 2025 09:51 — forked from sylvaincombes/my-external-ip.sh
View your external ip from linux / unix shell
# with dig (fastest way)
dig +short myip.opendns.com @resolver1.opendns.com;
# alternative
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}';
######################################################################################################
## Other method with curl / get and 3rd party, this choice is less judicious
######################################################################################################
# with curl