Mac 命令行查看自己的公网IP

Mac 查看本机公网IP 命令

curl ifconfig.me  

如果想更好看一点

curl ipinfo.io/json

还可以用wget

wget http://ipecho.net/plain -O - -q ; echo
wget http://observebox.com/ip -O - -q ; echo

查看本机内网IP

ifconfig
ifconfig en0




原文地址:https://www.cnblogs.com/rxbook/p/11043642.html