Return to Snippet

Revision: 23322
at March 17, 2010 04:46 by berkes


Updated Code
wget --quit -O - checkip.dyndns.org | sed -e 's/[^:]*: //' -e 's/<.*$//'

Revision: 23321
at February 4, 2010 05:58 by berkes


Initial Code
wget -O -q - checkip.dyndns.org | sed -e 's/[^:]*: //' -e 's/<.*$//'

Initial URL
http://www.go2linux.org/what-is-my-public-ip-address-with-linux

Initial Description
Use wget and sed to get your public IP adress (instead of firing up firefox and visting whatismyip.com). Usefull in scripts where you need your public IP adres.

There are probably better ways, maybe even a GNUtool that I missed?

Initial Title
Commandline oneliner to get your public IP adress

Initial Tags
ip

Initial Language
Bash