您当前的位置:首页 > 计算机 > 系统应用 > Linux

Linux查看公有IP和私有IP的办法

时间:04-02来源:作者:点击数:

查看公有IP:

  1. curl ifconfig.me
  2. curl -4/-6 icanhazip.com
  3. curl ipinfo.io/ip
  4. curl api.ipify.org
  5. curl checkip.dyndns.org
  6. dig +short myip.opendns.com @resolver1.opendns.com
  7. host myip.opendns.com resolver1.opendns.com
  8. curl ident.me
  9. curl bot.whatismyipaddress.com
  10. curl ipecho.net/plain

查看私有IP:

  1. ifconfig -a
  2. ip addr (ip a)
  3. hostname -I | awk '{print $1}'
  4. ip route get 1.2.3.4 | awk '{print $7}'
  5. (Fedora) Wifi-Settings→ click the setting icon next to the Wifi name that you are connected to → Ipv4 and Ipv6 both can be seen
  6. nmcli -p device show
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门