Created
December 7, 2018 11:15
-
-
Save sven-bock/9069164551fbc63d3ca286650ad8bf67 to your computer and use it in GitHub Desktop.
Rename a network device (Ubuntu 16.04)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create a file called | |
/etc/udev/rules.d/70-persistent-net.rules | |
#Add this and replace address and name: | |
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="02:01:02:03:04:05", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="eth0" | |
#Modify the grub configuration | |
/etc/default/grub | |
# Replace this line | |
GRUB_CMDLINE_LINUX="" | |
# with | |
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" | |
# Upgrade your grub and reboot | |
sudo update-grub | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment