linux 查看自己所在的公网ip

curl members.3322.org/dyndns/getip  

其他的方法还有:

curl icanhazip.com  
curl ifconfig.me  
curl curlmyip.com  
curl ip.appspot.com  
curl ipinfo.io/ip  
curl ipecho.net/plain  
curl www.trackip.net/i  
原文地址:https://www.cnblogs.com/qlqwjy/p/8413004.html