Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Wi-Fi called en0, like ethernet, on a Mac OS X? [closed]

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?

like image 945
Hugo Avatar asked Apr 16 '14 03:04

Hugo


People also ask

What is en0 on Mac?

Most new Mac devices will just have en0 - your WiFi. en0 is the first device to start, en1 the second, etc. lo0 is the 'loopback' interface. Otherwise known as localhost, or 127.0. 0.1.

Is en0 Ethernet?

If you install an Ethernet adapter in your system, the operating system assigns it the name ent0 and add both an Ethernet Version 2 and an IEEE 802.3 interface, named en0 and et0 respectively. In most cases, there is a one-to-one correspondence between adapter names and network interface names.

What is en0 in network?

ent0 is a "network adapter" which represents a physical device while en0 is a logical device (based on ent0) representing a standard "network Interface". "et0" could be another kind of "network interface" based on ent0. et0 is an IEEE 802.3 "network interface".

How do I know if my Mac is using Ethernet or Wi-Fi?

You can check the status of your network connection, such as Ethernet or Wi-Fi, using Network preferences. The information you see here may be useful if you are troubleshooting a connection problem. On your Mac, choose Apple menu > System Preferences, then click Network .


1 Answers

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.

like image 75
Martin Bergek Avatar answered Oct 12 '22 14:10

Martin Bergek