Changing Network Interfaces in Centos 7
Network Interfaces
I would want to share how you can change the Network Interfaces Name in Centos 7 machines.
First you need to edit file as below :
vi /etc/default/grubYou may add "net.ifnames=0 in GRUB_CMDLINE_LINUX" variable as below.
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet net.ifnames=0"Then rebuild the grub to apply the name on boot.
grub2-mkconfig -o /boot/grub2/grub.cfgNext, you may now rename the network interface that suits your preferences
cd /etc/sysconfig/network-scripts; mv ifcfg-ens32 ifcfg-eth0When editing the network-interface, remember to also change the value of DEVICE and NAME, then reboot the server.
init 6After reboot, use command "ifconfig" to verify whether the Network Interface name are changed.
Last updated
Was this helpful?