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, DEVICE and HWADDR paarameters in ifcfg-enp1s0f1 file.
Change NAME, DEVICE and HWADDR 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.
6. Reboot a server
You can manually reboot server by pressing power button or execute a reboot command in terminal.
[root@worldwidelinux ]# reboot
7. Check Network Interface Name
Execute nmcli command to list all the network devices.
[root@worldwidelinux ]# nmcli device