1. 使用curl命令
curl ifconfig.me
2. 使用wget命令
wget -qO- ifconfig.io/ip
3. 使用nslookup命令
nslookup myip.opendns.com resolver1.opendns.com
4. 使用ip命令
curl -s https://ipinfo.io/ip | xargs -n1 ip addr | grep inet | grep -v inet6 | awk '{print $2}' | sed 's/\/.*//'
注释:第四种方式个人测试不太准确
06-01
193
07-12
3397
10-27
1万+
02-27
2357
08-02
2815
10-26
2367
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交