How to get your public IP on Linux

If you don’t have GUI installed and if you want to get your public ip address from Linux cli, just use the following commands :

Using curl

# curl -s ip.appspot.com

# curl icanhazip.com

Using lynx

# yum install lynx -y
# lynx http://www.whatismyip.com