当前位置:   article > 正文

macOS查看IP地址的命令_mac ipconfig

mac ipconfig

查看内网的 IP 地址:

ipconfig getifaddr en0 
  • 1
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  ~ % 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

查看公网 IP 地址:

[~]$ 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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/229860
推荐阅读
相关标签
  

闽ICP备14008679号