Linux – What is my public IP address?

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.

Using wget

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

Using curl

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

curl -s

Using Lynx

lynx -dump

lynx -dump | grep 'Your IP'

As you can see, there are a lot of ways to check your Public IP address using console commands in Linux.

Of course you can always open a browser and enter any of those URIs and check there.

One Reply to “Linux – What is my public IP address?”

  1. Pingback: Linux – What is my public IP address?

Leave a Reply

Your email address will not be published. Required fields are marked *