Created
December 10, 2020 17:58
-
-
Save techie2000/340b3afda7d26530d1a57b876338ae83 to your computer and use it in GitHub Desktop.
whats my external ip address?
This file contains hidden or 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
curl -s http://whatismyip.akamai.com/ |
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}'
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
or return just the country
curl -s ipinfo.io/ | jq ".country"