How to Change the Interface Name in Linux
Old Name: ens192
New Name: eth0
Check interface details
/etc/init.d/network status shows this output:
Configured devices:
lo eth0
Currently active devices:
lo enp192
Rename the interface
ip link set enp192 down
ip link set enp192 name eth0
ip link set eth0 up
Move configuration file and update the values
mv /etc/sysconfig/network-scripts/ifcfg-{enp192,eth0}
sed -ire "s/NAME=\"enp192\"/NAME=\"eth0\"/" /etc/sysconfig/network-scripts/ifcfg-eth0
sed -ire "s/DEVICE=\"enp192\"/NAME=\"eth0\"/" /etc/sysconfig/network-scripts/ifcfg-eth0
1 Comments
so good
ReplyDeletePost a Comment