How to get your WAN IP from the command line

Curl:

curl canhazip.com

curl ident.me

I noticed that in some cases the above returns an IPv6 address, to specify IPv4 do this:

curl ipv4.icanhazip.com

curl ipv4.ident.me

IPv4 from a different service:

curl https://ipv4.lafibre.info/ip.php

Wget:

wget -q -O - ident.me

Bonus, get the weather via curl: curl wttr.in

WordPress Appliance - Powered by TurnKey Linux