How to see the IP address of your internet connection
There are multiple ways to find out your internet IP address from the command line. One way is using the dig command.
Using dig
With dig we can query the hostname myip.opendns.com. To prevent any intermediate DNS resolver to send an incorrect answer, use the source system.
dig +short myip.opendns.com @resolver1.opendns.com
Using curl
Some external websites also provide the IP address. If there is no proxy between you and the related server, it can also provide your IP address.
curl ifconfig.me