Linux查看公有IP和私有IP的办法
时间:04-02来源:作者:点击数:
查看公有IP:
- curl ifconfig.me
- curl -4/-6 icanhazip.com
- curl ipinfo.io/ip
- curl api.ipify.org
- curl checkip.dyndns.org
- dig +short myip.opendns.com @resolver1.opendns.com
- host myip.opendns.com resolver1.opendns.com
- curl ident.me
- curl bot.whatismyipaddress.com
- curl ipecho.net/plain
查看私有IP:
- ifconfig -a
- ip addr (ip a)
- hostname -I | awk '{print $1}'
- ip route get 1.2.3.4 | awk '{print $7}'
- (Fedora) Wifi-Settings→ click the setting icon next to the Wifi name that you are connected to → Ipv4 and Ipv6 both can be seen
- nmcli -p device show
方便获取更多学习、工作、生活信息请关注本站
微信公众号