There are several web sites that spit out your IP address when you visit one of them.
IP Address – Command Line
But what if you’re on the terminal and do not want to fire up the browser just to check the IP address.
Not a problem, sweetie.
There are several commands you can run to find your IP address while on the terminal.
Here are a few of the “find my IP” commands that you can run on the terminal:
dig +short myip.opendns.com @resolver1.opendns.com
Important: Make sure you have curl installed on your computer. Without curl, most of the above commands (except for the dig + …) will not work.
Knowing your IP addresses is important for a variety of reasons including access to geographically restricted content, access control to sensitive sites (corporate, personal etc) and sometimes for tech support.