Linux 终端获取本机公网 IP 的方法 下方任意命令均可: $ wget -qO- https:
//ipecho.net/plain ; echo $ curl https://ipecho.net/plain $ curl https://ipecho.net/plain ; echo $ curl https://ipinfo.io/ip $ curl icanhazip.com $ curl -s https://checkip.dyndns.org | sed -e 's/.\*Current IP Address: //' -e 's/<.\*$//' References Command for determining my public IP?
Linux 终端获取本机公网 IP 的方法
下方任意命令均可:
$ wget -qO- https://ipecho.net/plain ; echo
$ curl https://ipecho.net/plain
$ curl https://ipecho.net/plain ; echo
$ curl https://ipinfo.io/ip
$ curl icanhazip.com
$ curl -s https://checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'