# Public IP 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)”
```
