How to get your external IP address in five letters

I was setting up a VPN client on a server and found myself querying my external IP address quite often (to check whether I was connected to the VPN or not).

As you know, curl icanhazip.com or curl ifconfig.me will give you your external IP. (You did know that, right? If not, congratulations, your life as a sysadmin has just become easier!) However, we can make that even shorter by simply using bash’s aliasing ability. Just type into your terminal session:

alias extip="curl icanhazip.com"

And now you can simply:

$ extip
214.xxx.xxx.xxx

I prefer to call it efficiency, rather than laziness.

Continue reading How to get your external IP address in five letters