Get You External IP From Linux via the Command Line

I’m always needing to do this so here’s two quick ways.
[code]wget -qO- http://ipecho.net/plain[/code]
Or if you prefer curl:
[code]curl http://ipecho.net/plain[/code]
The ifconfig.me site
If you browse this website with your normal browser it will show how to get a lot of information from the command line, using curl, to get just the IP you can use:
[code]curl ifconfig.me[/code]
Now if windows was just as easy…if you have curl under Windows it is.

Leave a Reply

Your email address will not be published. Required fields are marked *