linux 获取公网 IP 方法

以下为 linux 如何获取公网 ip 的方法

curl cip.cc

  • linux 命令:curl cip.cc
  • windows 命令:telnet cip.cc
  • 纯 IP 命令:curl ip.cip.cc
[root@localhost ~]# curl cip.cc
IP      : 115.196.88.33
地址    : 中国  北京
运营商  : 阿里云/联通/电信/移动

数据二  : 北京市 | 阿里云

数据三  : 中国北京北京 | 电信

URL     : http://www.cip.cc/115.196.88.33
[root@localhost ~]# curl ip.cip.cc
116.196.112.113

curl ifconfig.me

[root@localhost ~]# curl ifconfig.me
116.196.112.113
原文地址:https://www.cnblogs.com/newber/p/14178144.html