Você pode ver os nomes que são usados nas Preferências do Sistema para alguns dos dispositivos executando networksetup -listallhardwareports
:
Hardware Port: HUAWEIMobile-
Device: HUAWEIMobile-Modem
Ethernet Address: N/A
Hardware Port: Bluetooth DUN
Device: Bluetooth-Modem
Ethernet Address: N/A
Hardware Port: Ethernet
Device: en0
Ethernet Address: a8:20:66:31:95:57
Hardware Port: MBBEthernet
Device: en5
Ethernet Address: 00:1e:10:1f:00:01
Hardware Port: Wi-Fi
Device: en1
Ethernet Address: 8c:2d:aa:33:03:e9
Hardware Port: Bluetooth PAN
Device: en4
Ethernet Address: 8c:2d:aa:33:03:ea
Hardware Port: Thunderbolt 1
Device: en2
Ethernet Address: 32:00:1b:25:92:c0
Hardware Port: Thunderbolt 2
Device: en3
Ethernet Address: 32:00:1b:25:92:c1
Hardware Port: Thunderbolt Bridge
Device: bridge0
Ethernet Address: N/A
VLAN Configurations
===================
networksetup -listnetworkserviceorder
produz saída semelhante, mas exibe "uma lista de serviços de rede na ordem em que eles são contatados para uma conexão" ou mostra os serviços na mesma ordem das Preferências do Sistema.
networksetup
não inclui dispositivos como os dispositivos vmnet1
e vmnet8
usados pelo VMWare.
Você pode ver mais informações sobre os en
dispositivos executando defaults read /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
:
{
Interfaces = (
{
Active = 1;
"BSD Name" = en0;
IOBuiltin = 1;
IOInterfaceNamePrefix = en;
IOInterfaceType = 6;
IOInterfaceUnit = 0;
IOMACAddress = <a8206631 9557>;
IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP03@1C,2/IOPP/GIGE@0/BCM5701Enet/en0";
SCNetworkInterfaceInfo = {
UserDefinedName = Ethernet;
};
SCNetworkInterfaceType = Ethernet;
},
{
Active = 1;
"BSD Name" = en1;
IOBuiltin = 1;
IOInterfaceNamePrefix = en;
IOInterfaceType = 6;
IOInterfaceUnit = 1;
IOMACAddress = <8c2daa33 03e9>;
IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP04@1C,3/IOPP/ARPT@0/AirPort_Brcm4360/en1";
SCNetworkInterfaceInfo = {
UserDefinedName = "Wi-Fi";
};
SCNetworkInterfaceType = IEEE80211;
},
{
Active = 1;
"BSD Name" = en2;
IOBuiltin = 1;
IOInterfaceNamePrefix = en;
IOInterfaceType = 6;
IOInterfaceUnit = 2;
IOMACAddress = <32001b25 92c0>;
IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP05@1C,4/IOPP/UPSB@0/IOPP/DSB0@0/IOPP/NHI0@0/AppleThunderboltHAL/AppleThunderboltNHIType2/IOThunderboltController/IOThunderboltLocalNode/AppleThunderboltIPService/AppleThunderboltIPPort/en2";
SCNetworkInterfaceInfo = {
UserDefinedName = "Thunderbolt 1";
};
SCNetworkInterfaceType = Ethernet;
},
{
Active = 1;
"BSD Name" = en3;
IOBuiltin = 1;
IOInterfaceNamePrefix = en;
IOInterfaceType = 6;
IOInterfaceUnit = 3;
IOMACAddress = <32001b25 92c1>;
IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP05@1C,4/IOPP/UPSB@0/IOPP/DSB0@0/IOPP/NHI0@0/AppleThunderboltHAL/AppleThunderboltNHIType2/IOThunderboltController/IOThunderboltLocalNode/AppleThunderboltIPService/AppleThunderboltIPPort/en3";
SCNetworkInterfaceInfo = {
UserDefinedName = "Thunderbolt 2";
};
SCNetworkInterfaceType = Ethernet;
},
{
"BSD Name" = en4;
IOBuiltin = 0;
IOInterfaceNamePrefix = en;
IOInterfaceType = 6;
IOInterfaceUnit = 4;
IOMACAddress = <8c2daa33 03ea>;
IOPathMatch = "Migrated_From: IOService:/IOResources/IOUserEthernetResource/IOUserEthernetResourceUserClient/IOUserEthernetController/en2";
SCNetworkInterfaceInfo = {
UserDefinedName = "Bluetooth PAN";
};
SCNetworkInterfaceType = Ethernet;
},
{
Active = 1;
"BSD Name" = en5;
IOBuiltin = 0;
IOInterfaceNamePrefix = en;
IOInterfaceType = 6;
IOInterfaceUnit = 5;
IOMACAddress = <001e101f 0001>;
IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/EHC1@1D/AppleUSBEHCI/HUAWEI Mobile@1d110000/IOUSBInterface@4/HuaweiDataCardECMData/en5";
SCNetworkInterfaceInfo = {
"USB Product Name" = "HUAWEI Mobile";
UserDefinedName = MBBEthernet;
idProduct = 5382;
idVendor = 4817;
};
SCNetworkInterfaceType = Ethernet;
}
);
Model = "iMac13,1";
}
Além do que o iklier disse sobre o nome do dispositivo para Wi-Fi sendo en0
em laptops sem uma porta ethernet e en1
em Macs com uma única porta ethernet, também é en2
em pelo menos alguns Mac Prós com duas portas ethernet.