Linux 查看其公网 IP 地址

ksky-2023 / 2023-05-11 / 原文

1、Linux 查看其公网 IP 地址

1 [root@localhost ~]#  curl ifconfig.me
2 xx.xx.xx.xx

如果该命令无效,可以使用下面一个命令,也同样可可以查看到本机连接的公网信息

1 [root@localhost ~]#  curl cip.cc
2 IP      : xx.xx.xx.xx
3 地址    : 中国  北京
4 运营商  : bjedu.com.cn
5 数据二  : 北京市 | 教育信息网
6 数据三  : 中国北京北京市 | xx网络
7 URL     : http://www.cip.cc/xx.xx.xx.xx