Monday, June 13, 2016

How to check the external IP address on Linux

# curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'

or shorter

# wget http://ipinfo.io/ip -qO

Reference:

http://askubuntu.com/questions/95910/command-for-determining-my-public-ip

1 comment:

YaoJun said...

even simpler,
# curl ifconfig.co