Ubuntu – How to revert USB wifi interface name (from wlxXXXXXXXXXXXX to wlanX)

systemdusbwireless

With Ubuntu 16.04 the USB wifi interface are now wlxXXXXXXXXXXXX where the X are the digits of the device's mac adress (policy of predictable interface name)
More information about this can be find here: systemd:PredictableNetworkInterfaceNames

actually all interface naming has changed but I was able to go back to the old fashion way (ethX for ethernet interface, wlanX for inetrnal wifi card) modifying /etc/default/grub as suggested in the third post of this thread changing network interfaces name ubuntu 16-04
My problem is that this solution doesn't works for the USB interfaces and I still have this very annoying long name (i use command line a lot to play with my wifi interfaces)
interface naming issue

 So here is my question: 

What should I do to disable this new rules for my USB wifi interface?
Thanks for your advices and excuse my poor english.
Bye

Best Answer

You missed one thing from https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

Then reboot

I think it needs to be the 80-net-setup-link.rules file in /etc/udev/ as the one laptop I updated to Ubuntu 16.04 from 15.10 still contained a file named /lib/udev/rules.d/73-usb-net-by-mac.rules and it contained

# Use MAC based names for network interfaces which are directly or indirectly
on USB and have an universally administered (stable) MAC address (second bit
is 0).

IMPORT{cmdline}="net.ifnames", ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end" PROGRAM="/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules", RESULT=="/dev/null", GOTO="usb_net_by_mac_end"

ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \ ATTR{address}=="?[014589cd]:*", \ IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"

LABEL="usb_net_by_mac_end"

And it specifies /etc/udev/rules.d/80-net-setup-link.rules

This file does not exist in any of my clean installs of Ubuntu 16.04 but part of this must exist in other source code

Related Question