Skip to content

Instantly share code, notes, and snippets.

@techie2000
Created December 10, 2020 17:58
Show Gist options
  • Save techie2000/340b3afda7d26530d1a57b876338ae83 to your computer and use it in GitHub Desktop.
Save techie2000/340b3afda7d26530d1a57b876338ae83 to your computer and use it in GitHub Desktop.
whats my external ip address?
curl -s http://whatismyip.akamai.com/
@techie2000
Copy link
Author

or return just the country curl -s ipinfo.io/ | jq ".country"

@techie2000
Copy link
Author

if you don't have curl installed, may be try host myip.opendns.com resolver1.opendns.com | grep "myip.opendns.com has" | awk '{print $4}'

@techie2000
Copy link
Author

or you try wget -qO- http://ipecho.net/plain | xargs echo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment