how to Change default Interface name (enp0s3) to old “eth0”

Linuxtopic
0


Q :  how to Change default Interface name (enp0s3) to old “eth0”

Q : how to rename eth0 like interface name on centos 7 / ubuntu 16


Change default network name like enp0s3 or enp1s0 to old like eth0 / eth1 or wlan0 in Ubuntu 16 and CentOS 7

# ifconfig output




Step 1 :   open grub.cfg file

Ubutnu 16 :

vi /boot/grub/grub.cfg

Centos 7 :

vi /boot/grub2/grub.cfg


Step 2 :   

go to menu entry menuentry, find vmlinux line and add “net.ifnames=0 after the word “quiet”

Ubuntu 16 Output:



CentOS 7 Output :



Step 3: 

Reboot your system and change interface name ( enp0s3 ) to ( eth0) in network file

Ubuntu 16

vi /etc/network/interfaces












reboot

CentOS 7 : 

mv /etc/sysconfig/network-scripts/ifcfg-enp0s3 /etc/sysconfig/network-scripts/ifcfg-eth0

vi /etc/sysconfig/network-scripts/ifcfg-eth0






















Restart Network Service

systemctl restart network




Tags:

Post a Comment

0Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Ok, Go it!