I'm trying to figure out how to restore the simple interface names in Ubuntu 16.04. I.e. enp3s0
renamed to eth0
.
-
I have tried to modify the GRUB configuration. I have tried editing
/etc/udev/rules.d/10-network.rules
, but both methods did nothing for me.
Help is greatly appreciated./etc/udev/rules.d/10-network.rules
: (I hid the mac address names.)SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="XX:XX:XX:XX:XX:XX″,KERNEL=="enp0s0″, NAME="eth0″ SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="XX:XX:XX:XX:XX:XX″,KERNEL=="wlx02c5c1866772″, NAME="wlan0″
-
And I changed this line in the GRUB configuration (
/etc/default/grub
) …GRUB_CMDLINE_LINUX=""
to look like this:
GRUB_CMDLINE_LINUX="net.ifnames=1"
Best Answer
Tested on VBox with Ubuntu 16.04,
enp0s3
→eth0
Option 1:
Override udev rule
Update RAMDisk
Option 2:
Create a systemd link file
Let's define name related to MAC: (There are many options, see the linked reference)
Update RAMDisk
Option 3:
Add
net.ifnames=0
to boot parametersUpdate grub
Reference: systemd: Predictable Network Interface Names, Thanks @mikewhatever .