Public IP From Command Line

Derive public IP address of a host from command line

Derive Public IP address of a host from command line:

dig +short myip.opendns.com @resolver1.opendns.com
curl bot.whatismyaddress.com -w β€œ\n”
curl ip.tyk.nu -w β€œ\n”
curl wgetip.com -w β€œ\n”
curl icanhazip.com
curl whatismyip.akamai.com -w β€œ\n”
curl ipecho.net/plain -w β€œ\n”
curl ident.me -w β€œ\n”
curl -s http://ifconfig.me -w β€œ\n”
cat icanhazip.com 80 <<< $’GET / HTTP/1.1\nHost: icanhazip.com\n\n’ | tail -n1
zenity –info –text β€œ$(curl -s icanhazip.com)”

Last updated