Know your Global IP from terminal

I read an article on life-hacker , which was the thing i was using from past few months something very much similar , but any-ways , he speaks only about how it works , i strongly feel we rahter make a command , but how ??!! i am sharing it ...

Making your own command called "myip"

$ alias myip='curl -s |grep '"Box"' | egrep -o '[0-9.]+''

$ alias myip='wget -qO-'

or u can also use wget -O - -q instead of curl .

Now , $ myip will give you your global IP

Share this