Public IP address from the command line
If you're on a *nix system you can use the following snippet to get your public IP address.
dig +short myip.opendns.com @resolver1.opendns.com
Or you can add an alias to make it even easier.
I’m Alistair: a web and mobile developer based in the Australia.
If you're on a *nix system you can use the following snippet to get your public IP address.
dig +short myip.opendns.com @resolver1.opendns.com
Or you can add an alias to make it even easier.