How to see the IP address of your internet connection
How to see the IP address of your internet connection from the command line?
Use the dig command and query the myip.opendns.com hostname to see the IP address of your internet connection that performed the DNS query.
dig +short myip.opendns.com @resolver1.opendns.comThere 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