Une console de commande qui affiche l'adresse IP publique que nous avons.

echo $(curl -s http://ipwhats.appspot.com/)

Pourrait ne pas avoir la commande curl installé sur votre système. Dans ce cas, nous pouvons installer avec:

sudo apt-get -y install curl

http://ipwhats.appspot.com