How to rename network interface in 15.10?

My solution to this was to create a file /etc/udev/rules.d/10-rename-network.rules with the content:

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ff:ff:ff:ff:ff", NAME="eth0"

I had the same problem and adding files to /etc/udev/rules.d/ did not help. The issue seems to be in the use of Predictable Network Interface Names as described here. To create your own manual naming scheme, i.e., to name your device "eth0" for MATLAB, you can create your own .link files in /etc/systemd/network/ as described here.

Specifically, I created a file /etc/systemd/network/10-eth.link with the contents

[Match]
MACAddress=ff:ff:ff:ff:ff:ff
[Link]
Name=eth0

replacing ff:ff:ff:ff:ff:ff with the MAC address of the device I wanted to change. After reboot the name was as desired.


If for any reason answer suggested by @zab doesnt work for you, you can also disable this naming scheme like it made here. But the method proposed by @zab is potentially safer

I just did not include biosdevname=0 to command line argument, it seems to be turned off by default.

Following steps schould be made:

$ sudo nano /etc/default/grub

At the line GRUB_CMDLINE_LINUX add net.ifnames=0

GRUB_CMDLINE_LINUX="[previous parameters] net.ifnames=0"

Then generate new grub file:

$ sudo grub-mkconfig -o /boot/grub/grub.cfg

At the end reboot system.


I had this issue running 16.04 Server (minimal) on a raspberry pi 3 and none of the posted answers helped. What solved the problem was disabling Predictable Network Interface Names as descripbed here: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

by running this command:

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

This worked for me on 16.04 server as eno1 was showing when I did ifconfig -a. I had to bring up the interface as ifconfig eno1 up then I did the following:

vi /etc/udev/rules.d/10-network.rules

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ff:ff:ff:ff:ff", NAME="eth0"