Get public IP
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.com # curl ifconfig.me # wget -qO- ifconfig.me/ip