Pages

Wednesday, July 6, 2011

How to see your public IP address from command line

Searching around I found few ways to do that while using Linux console. Upon entering the script , the prompt will return the public IP address

~$ wget -qO- whatismyip.org && echo

~$ wget -q -O - whatismyip.org;echo

~$ wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'