How to know external IP address from Linux terminal?

19 Jul 2014
ifconfig displays only local ip address of your system. If your system is directly connected to internet then it will be your external ip address. It may not be the case always. Because you will be behind a router or a modem.
You can know the external IP address by going to www.whatismyip.com or www.ipecho.net. If you want to know it from a terminal type

curl curlmyip.com

What curl do is it fetches the content of the link to the terminal. There are also several other websites that offers this same service. Some of them are listed below.

curl ipecho.net/plain

curl myexternalip.com/raw

curl curlmyip.com


curl ifconfig.me/ip


curl icanhazip.com


curl ip.appspot.com






Comments