This tutorial will guide you on how to perform a Network Interface Name change from ifcfg-enp1s0f1 to eth0 on RedHat 8.1 Linux server.
Execute below command to list all the network devices
[root@worldwidelinux ]# nmcli device
Please follow below steps to change a network interface name on RedHat 8.1 Linux Server:
1. Update GRUB File
Edit file /etc/default/grub and add net.iframes=0 blosdevname=0 to line GRUB_CMDLINE_LINUX.
2. Regenerate a GRUB configuration file and overwrite existing one:
[root@worldwidelinux ]# grub2-mkconfig -o /boot/grub2/grub.cfg
3. Edit NAME and DEVICE lines in ifcfg-enp1s0f1 file.
Change NAME and DEVICE fields from enp1s0f1 to eth0 on ifcfg-enp1s0f1 file.
4. Move ifcfg-enp1s0f1 file to ifcfg-eth0
Move a network configuration file to ifcfg-eth0 using mv command.
[root@worldwidelinux ]# mv /etc/sysconfig/network-scripts/ifcfg-enp1s0f1 /etc/sysconfig/network-scripts/ifcfg-eth0
5. Disable Network Manager Service
For network interface name change, you must disable networkmanager service otherwise it will revert back the changes on reboot.