查看内网的 IP 地址:文章来源:https://www.toymoban.com/news/detail-559540.html
ipconfig getifaddr en0
Last login: Thu Aug 11 17:13:00 on ttys000
grnt@wMacBook-Pro ~ % ipconfig getifaddr en0
192.168.0.107
grnt@wMacBook-Pro ~ % ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
ether 3c:06:30:49:2c:57
inet6 fe80::470:d967:f748:aa63%en0 prefixlen 64 secured scopeid 0xc
inet 192.168.0.107 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
grnt@wMacBook-Pro ~ %
查看公网 IP 地址:文章来源地址https://www.toymoban.com/news/detail-559540.html
[~]$ curl ifconfig.me
183.194.149.6%
[~]$ curl ipinfo.io/json
{
"ip": "183.194.149.6",
"city": "Shanghai",
"region": "Shanghai",
"country": "CN",
"loc": "31.2222,121.4581",
"org": "AS24400 Shanghai Mobile Communications Co.,Ltd.",
"timezone": "Asia/Shanghai",
"readme": "https://ipinfo.io/missingauth"
}%
[~]$ curl icanhazip.com
183.194.149.6
[~]$ curl ident.me
183.194.149.6%
[~]$ curl whatismyip.akamai.com
183.194.149.6%
[~]$ curl tnx.nl/ip
183.194.149.6%
[~]$ curl myip.dnsomatic.com
183.194.149.6%
[~]$ curl myip.ipip.net
当前 IP:183.194.149.6 来自于:中国 上海 上海 移动
[~]$ curl http://members.3322.org/dyndns/getip
183.194.149.6
到了这里,关于macOS查看IP地址的命令的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!