您当前的位置: 首页 >  macos

liaowenxiong

暂无认证

  • 2浏览

    0关注

    1171博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

macOS查看IP地址的命令

liaowenxiong 发布时间:2021-12-17 03:02:46 ,浏览量:2

查看内网的 IP 地址:

[~]$ ipconfig getifaddr en0
192.168.30.25
# 或者
[~]$ ifconfig en0
en0: flags=8863 mtu 1500
	options=400
	ether d4:61:9d:11:c2:94 
	inet6 fe80::cbc:309b:57a4:5cf6%en0 prefixlen 64 secured scopeid 0x5 
	inet 192.168.30.25 netmask 0xffffff00 broadcast 192.168.31.255
	nd6 options=201
	media: autoselect
	status: active

查看公网 IP 地址:

[~]$ curl ifconfig.me
123.45.78.80%

[~]$ curl ipinfo.io/json
{
  "ip": "123.45.78.80",
  "city": "Xiamen",
  "region": "Fujian",
  "country": "CN",
  "loc": "24.4798,118.0819",
  "org": "AS9808 China Mobile Communications Group Co., Ltd.",
  "timezone": "Asia/Shanghai",
  "readme": "https://ipinfo.io/missingauth"
}%   

[~]$ curl icanhazip.com
123.45.78.80

[~]$ curl ident.me
123.45.78.80%                                                                                                                                                                                               

[~]$ curl whatismyip.akamai.com
123.45.78.80%

[~]$ curl tnx.nl/ip
123.45.78.80%

[~]$ curl myip.dnsomatic.com
123.45.78.80% 

[~]$ curl myip.ipip.net
当前 IP:123.45.78.80  来自于:中国 福建 三明  移动

[~]$ curl http://members.3322.org/dyndns/getip
123.45.78.80
关注
打赏
1661566967
查看更多评论
立即登录/注册

微信扫码登录

0.0399s