20

Linux has been my main system for years now. In Linux, ethernet hardware devices have names like eth0 or enp1s0 (the latter I've only seen on Arch Linux). The wireless card has always had names like wlan0 or wlp2s0 (again the latter on Arch). On my new MacBook Air, the wireless network is assigned en0, which I've read stands for ethernet. Also, there's an en1 even though I don't have an ethernet port. What does this naming convention mean?

nbro
  • 15,395
  • 32
  • 113
  • 196
Hugo
  • 2,186
  • 8
  • 28
  • 44
  • en probably is named for **E** thern **n** et. – Linville Apr 16 '14 at 12:37
  • Right, but why is it that my wireless card is also named after ethernet? – Hugo Apr 16 '14 at 18:25
  • In addition to the low level radio functionality provided by your 802.11 Wifi interface there is a built-in 802.3 Ethernet MAC since that is the primary frame format transferred over Wifi. The OS is not distinguishing this interface from the wired equivalent in its naming system. – Kevin Thibedeau Apr 18 '14 at 20:12
  • Oh so even though my MacBook doesn't have an RJ45 input for an ethernet cable it still uses that name because the frame is an ethernet frame? – Hugo Apr 18 '14 at 23:57
  • `en1` is probably referring to one of the thunderbolt ports, that use IP over thunderbolt. Although this is a different layer 2 medium, as described in another answer, probably uses the same kernel driver. – silicontrip Jul 22 '22 at 10:47

1 Answers1

22

It's worth keeping in mind that OSX is not Linux, it is basically BSD. And in BSD network interfaces are named after the device driver that manages the interface, not necessarily based on the type of device. My guess is that the same driver supports both built-in WiFi interfaces and wired NICs on Apple computers.

You can list all interfaces using the command

networksetup -listallhardwareports

On my Macbook this lists a number of interfaces (WiFi, Bluetooth, Thunderbolt) and they are all named enX.

Martin Bergek
  • 321
  • 3
  • 10