Thursday, June 6, 2013

Getting your real IP inside Terminal

If you want to check you current public IP for you PC / Mac, sure you know when you visit whereismyip "http://whatismyipaddress.com/".

However, what to do if you are inside a Terminal, with just an internal IP?

Just try:
curl -s http://checkip.dyndns.org | sed 's/[a-zA-Z/<> :]//g'
or
wget http://ipecho.net/plain -O - -q ; echo

Then you can get your real IP. 

Coding for Fun

 :)


No comments:

Post a Comment