The below two methods rely on external services to detect the IP address. Any one of the listed service can be used
- http://myip.dnsomatic.com
- http://checkip.dyndns.org:8245
- http://whatismyip.com
- http://whatismyip.org
- http://jsonip.com
- http://icanhazip.com
- http://ip.appspot.com
1) curl :
Can be installed by running command "sudo apt-get install curl". To know the IP run commandcurl http://myip.dnsomatic.com
my preferred url is http://myip.dnsomatic.com a service by opendns and can be replaced with any one of the above urls.
2) wget :
By default wget would be installed on most of the system if not can be installed with command "sudo apt-get install wget". To know the IP run commandwget http://myip.dnsomatic.com -O - -q ; echo
No comments:
Post a Comment