我正在尝试找到我的 Mac 的 IP 地址。在终端上使用以下命令:
ifconfig |grep inet
Output :
inet6 ::1 prefixlen 128
inet6fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff0000000
但是 127.0.0.1 是本地主机..那么如何找到 IP 地址?
是否配置
VISHWAS-MAC:~ VishwasGagrani$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 34:15:9e:2e:b6:c2
media: autoselect
status: inactive
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 7c:6d:62:a2:ec:ac
media: autoselect (<unknown type>)
status: inactive
fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078
lladdr 34:15:9e:ff:fe:2e:b6:c2
media: autoselect <full-duplex>
status: inactive
en2: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 7c:6d:62:a2:e6:15
media: autoselect
status: inactive
答案1
如果您不需要使用终端,则应跳至“系统偏好设置”>“网络”。该页面将显示您的 IP 以及您连接的网络。