Oneliners for Getting the External IP Address in Bash

In this article I will show you a bunch of oneliners that return your external IP address.

Watch Free Movies

One:
$ curl -s icanhazip.com

Two:
$ curl -s ip.appspot.com

Three:
$ curl -s whatismyip.org
OR:
$ wget -O - -q whatismyip.org

Four:
$ curl -s ifconfig.me

Sometimes you may need to get your IP address inside a bash script, so this commands are quite usefull.

Scroll to Top