How to use command line to get public network Ip__linux in Linux system

Source: Internet
Author: User
Tags curl

The server was recently configured locally with no fixed IP address for the bandwidth of the home. Therefore, you need to obtain your own public network IP address.

The machine is the server version of CentOS 6.5 naturally there is no way to access the public network IP address through the browser.

So record some ways to get the public network IP from the command line.

First, you need to follow the curl on the machine:

sudo yum Install Curl
Second, use one of the following commands to obtain a local address:

Curl Http://members.3322.org/dyndns/getip
Curl ip.6655.com/ip.aspx
Curl ifconfig.me Curl icanhazip.com
Curl ident.me
Curl Ipecho.net/plain Curl whatismyip.akamai.com-Curl

# More usage access ifconfig.co
wget-qo-ifconfig.co

#返回IP和地区
Curl ip.6655.com/ip.aspx?area=1
Curl cip.cc





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.