Getting the public IP is essential for the investigation of various issues. The most common method being used is accessing the websites such as www.whatismyip.com or www.whatismyipaddress.com from the browser. Some times, the browser may not be available. In such cases you can use the following commands to get public IP from the shell.
curl icanhazip.comcurl ifconfig.mewget -qO- ifconfig.me/ip
wget -qO- ifconfig.me/ip
That's it. You can now identify your public IP address of our cloud instance via the terminal.
Powered by BetterDocs