What’s my public IP address from linux command line

Lots of times you need to determine your public IP address, if you are using Linux operating system to power your PC, you may use some good console commands to guess your public IP address.

Most of these methods will return you the local IP and not the public IP of your proxy if you are behind one.


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


curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'


lynx -dump ifconfig.me | grep 'IP Address'

6 thoughts on “What’s my public IP address from linux command line

  1. Hmm it looks like your blog ate my first comment (it was extremely long)
    so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog.

    I as well am an aspiring blog blogger but I’m still new
    to everything. Do you have any recommendations for inexperienced blog writers?
    I’d definitely appreciate it.

  2. For those which are not prepared to try scuba, there are
    tons of decent sites to snorkel about the Keys including among the finest in the YOU.
    ‘Smite’ features a fresh plus much more realistic approach
    towards the MOBA in places you are playing like a god and
    minions could be the loyal worshippers. FAVORITE TV GUEST STAR *
    Demi Lovato, Grey’s Anatomy Betty White, Community Briney Spears, Gleee Carriee
    Underwood, How I Mett Your Mother Neil Patrick Harris, Glee.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s