1. 首页
  2. Linux

CentOS查询本机公网IP地址命令

CentOS查询本地IP地址命令,新手站长网分享:

查询公网IP地址命令

  • 执行命令:curl icanhazip.com
  • icanhazip.com是一个网址,打开这个网址就可以看到你的公网IP地址。所以,在Linux系统中使用curl icanhazip.com就可以看到你的公网IP。

    与icanhazip.com相类似的网站还有一个,即ifconfig.me,执行curl ifconfig.me也可以看到你的公网IP地址。

    阿里云官方活动:https://t.aliyun.com/U/FzmsXA

    腾讯云官方活动:https://curl.qcloud.com/oRMoSucP