Yuriy Markiv blog

TECH

get your external ip in console

16 November, 2017 | tech

Switching between different ISP and/or use dynamic IP so you need to distinguish it?

Just run:

curl ipinfo.io/ip

in your linux console (works on windows machines as well if you have curl tool installed). 

Need to rather run it once and see changes periodically? No problem, just add watch functionality (this is rather only for linux machines afaik): 

watch -n 60 curl ipinfo.io/ip

This will check for changes each minute.

Don't have these amazing tools installed yet? 

sudo apt-get update
sudo apt-get install curl
sudo apt-get install watch

Those ^^^ were for ubuntu linux, for windows rather google curl and download it (no known option for watch in windows afaik).

Enjoy.