How to check what is my public IP in Linux command line

How to check your public IP in Linux command line appears to be quite a common question, so we have an simple and easy solution for you.

You can get your IP from our “‘whatismyip” page by using command line tools like ‘curl’ and ‘wget’ and the following address:




If you are requesting it programatically and you need the response in JSON, use the following endpoint:

We hope that this simple tool will come useful for you, enjoy it!