1. 程式人生 > >Mac OS X ifconfig命令解釋

Mac OS X ifconfig命令解釋

在command 命令執行ifconfig之後,出現很多名詞,帶強迫症的我,不忍心一直矇在鼓裡

lo0
gif0
stf0
en0
fw0
en1
vmnet1

這都什麼鬼…停一秒鐘…

查檢視

lo0 = loopback
gif0 = Software Network Interface
stf0 = 6to4 tunnel interface
en0 = Ethernet 0
fw0 = Firewire
en1 = Ethernet 1
vmnet1 = Virtual Interface

那en0 en1 en2 en3 en4 怎麼這麼多???
執行一下命令:
networksetup -listallhardwareports

Hardware Port: Wi-Fi
Device: en0
Ethernet Address: c4:b3:01:bd:ad:1d

Hardware Port: Bluetooth PAN
Device: en3
Ethernet Address: c4:b3:01:bd:ad:1e

Hardware Port: Thunderbolt 1
Device: en1
Ethernet Address: 4a:00:07:4d:b2:b0

Hardware Port: Thunderbolt 2
Device: en2
Ethernet Address: 4a:00:07:4d:b2:b1

Hardware
Port: Thunderbolt Bridge Device: bridge0 Ethernet Address: 4a:00:07:4d:b2:b0

原來是Wi-Fi,藍芽,thunderbolt…安心了

來來來,再執行一次ifconfig