命令行 / Command-line 查看ipv4或v6地址

  • 参考:

国内的ip回显网站

1
2
3
4
curl myip.ipip.net
curl cip.cc
curl members.3322.org/dyndns/getip
curl ifcfg.cn/echo

国外的网站

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
curl ipinfo.io
curl ifconfig.me
curl ifconfig.me/all.json
curl ifconfig.me/all.xml
curl ifconfig.me/all
curl ipv4.icanhazip.com
curl ip.sb
curl ident.me
curl httpbin.org/ip
curl whatismyip.akamai.com
curl ipecho.net/plain
curl ipinfo.io/json
curl www.trackip.net/i
curl www.trackip.net/ip?json
curl http://checkip.dyndns.org

icanhazip.com

1
2
3
4
5
6
7
8
9
10
11
12
13
curl icanhazip.com
# 或
curl ipv6.icanhazip.com
# 或
curl --ipv6 icanhazip.com

# 查看v4地址,如果是双栈
curl ipv4.icanhazip.com
# 或
curl --ipv4 icanhazip.com

# 制定网络适配器查看
curl ipv4.icanhazip.com --interface wlp39s0f3