curl api.ipify.org
wget -qO- http://ipecho.net/plain | xargs echo
curl -s ipv6.icanhazip.com | xargs echo -n
# Print my public IP
dig +short myip.opendns.com @resolver1.opendns.com
# Output
77.122.128.246
# Store IP in Bash Variable
myip="$(dig +short myip.opendns.com @resolver1.opendns.com)"