Published on http://www.itswapshop.com (http://itswapshop.com)

Home > How to Get Public External IP From Command Line Terminal - Linux

How to Get Public External IP From Command Line Terminal - Linux

Submitted by ingram on Sun, 01/08/2012 - 1:59pm
Linux Public IP

If you are trying to find out what your public external IP address is, you typically go to a web site specifically for this purpose, such as ipchicken.com [1] or whatsmyip.org [2]. Thanks to cURL [3], you can easily do this from the command line too. To install cURL, run the following command:

  • Ubuntu: sudo apt-get install curl
  • openSUSE: sudo zypper install curl

To find out what public IP you are using, run this command:

curl ifconfig.me

A single line will be returned containing your public external IP address.

 

Privacy Policy

support @ itswapshop . com


Source URL: http://itswapshop.com/tutorial/how-get-public-external-ip-command-line-terminal-linux

Links:
[1] http://ipchicken.com/
[2] http://www.whatsmyip.org/
[3] http://curl.haxx.se/