Get Public IP Address Without ifconfig

Last modified: 
Friday, October 2nd, 2015
Topics: 
sysadmin

If you can't get your broadcast IP address with ifconfig for some reason, this oneliner will scrape it from DynDns.org.
curl -s checkip.dyndns.org | sed -e 's/.Current IP Address: //' -e 's/<.$//'


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.