ifconfig -a 顯示所有網路介面資訊。$ ifconfig -a
em0: flags=8843
options=9b
ether 00:0c:29:e2:ce:a2
inet 192.168.1.195 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::20c:29ff:fee2:cea2%em0 prefixlen 64 scopeid 0x2
nd6 options=29
media: Ethernet autoselect (1000baseT )
status: active
plip0: flags=8810
nd6 options=29
lo0: flags=8049
options=600003
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet 127.0.0.1 netmask 0xff000000
nd6 options=21
關鍵資訊:
inet 192.168.1.195 → IPv4 位址ether 00:0c:29:e2:ce:a2 → MAC 位址其他介面(plip0、lo0)為平行埠與回環介面,一般不需關注。