Ubuntu – Why doesn’t the Wi-Fi adapter show up as wlan0 in 16.04?


I just installed Ubuntu 16.04 on a separate HDD, and I noticed two oddities:

  • Whereas on 14.04 (on my main HDD) my USB Wi-Fi dongle shows up as wlan0, on 16.04 it shows up as wlx112233445566. (Real MAC redacted)

  • Also, using the hw ether parameter to change the MAC address doesn't work on 16.04.

Here's the relevant output from lsusb:

Bus 008 Device 002: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

Can anyone shed some light on what's going on here?

Best Answer

As of recently, Ubuntu (well, systemd) now uses something called Predictable Network Interface Names. Essentially, this means that non-permanent network interfaces (ie, USB interfaces) now have a name in the form of enx<MAC_ADDR>or wlx<MAC_ACCR> (or similar), so that any scripts and systems depending on that specific device will have 100% confidence that it's targeting the right device.

Other naming conventions will allow for the device to be referred to by physical location or any other form of permanently identifying value. Specifically, any of these values can be used to generate an interface name (with the best being chosen):

  • Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1)
  • Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1)
  • Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)
  • Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)
  • Classic, unpredictable kernel-native ethX naming (example: eth0)

In the past, interface names weren't assigned in a "sane" fashion -- some systems used pseudo-permanent names (wlan1 for a device with this MAC), others assigned them on a first-come first-serve basis. If you still prefer this scheme of doing things (or just hate persistent names because systemd is doing it), it's possible to reverse it by adding net.ifnames=0 to your boot arguments.

You should still be able to fake the MAC address of the device by using the Connection Editor, but hw ether will no longer work as the MAC address is a piece of the device's identifier/name.

Related Question