一般我们使用 :ifconfig可以试试这个(更纯净): osascript -e “IPv4 address of (system info)”