Rename Interface Name in Ubuntu 18.04
The below steps allow you to rename an interface name in Ubuntu 18.04 .
1. Check Mac Address of the interface that needs to be renamed using
ip a
2. Create the below file
nano /etc/udev/rules.d/70-persistent-net.rules
3. Add below line to the file and provide mac address of the interface and new interface name
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="MAC_ADDRESS", NAME="NEW_INTERFACENAME"4. Change the interface name in /etc/netplan/<filename>.yam l
network: ethernets: NEW_INTERFACENAME:5. Edit Grub file and add below value
nano /etc/default/grub
GRUB_CMDLINE_LINUX="net.ifnames=1 biosdevname=0"6. Update grub
update-grub7. Reboot VM