How To Find My Public IP Address From Command Line On a Linux

in #linux4 years ago

One of these two commands do the job:
$ dig +short myip.opendns.com @resolver1.opendns.com
$ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com

Original Post