How To Find My Public IP Address From Command Line On a Linux
January 20, 2022 at 11:05 am Leave a comment
For machines with GUI , Interface there are several ways to obtain the Public IP address. However , in Linux shell environment you need to rely on the commands(Even though there are 3rd party tools available).
Open a terminal window and type the below command:
#dig +short myip.opendns.com @resolver1.opendns.com
OR
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
Source:https://www.cyberciti.biz/
Entry filed under: Linux. Tags: Linux, public IP, terminal, what is my ip.
Trackback this post | Subscribe to the comments via RSS Feed