1 Answer
There are many commands to view the Public IP from command-line. Using dig command or curl command etc.
Dig command:
# dig +short myip.opendns.com @resolver1.opendns.com
Curl command:
# curl ifconfig.me
Your Answer