Skip to content
Home » General » What Is My Public IP Address Using Ubuntu Command Line

What Is My Public IP Address Using Ubuntu Command Line

To get the public ip, type:

dig +short myip.opendns.com @resolver2.opendns.com

Press Enter

And there you have it. Your Public IP