Why doesn't my Wi-Fi adapter show up as wlan0 in 16.04? [duplicate]
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 aswlx112233445566
. (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?
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.
it's possible to reverse it by adding net.ifnames=0 to your boot arguments.
That won't be enough to change the name for the USB interface...
You also need to play around with 80-net-setup-link.rules
1) Copy the current rule to your /etc/udev/rules.d/
directory
sudo cp /lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/
2) Create a symlink to send it to /dev/null
to disable it:
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
for more information check this thread: How to revert USB wifi interface name (from wlxXXXXXXXXXXXX to wlanX)?
I think it is as simple as a design change, the numbers are now different. It's not a fault. My LAN, for example, was eth0 in 14.04 (and still is in some other distros) but is enp0s25 in 16.04.
This naming convention has no impact on performance and i would not worry about it.
EDIT : Kaz Wolfe gives a more thorough explanation.