CentOS 7.x nic name eno16777736 change to eth0 step

Source: Internet
Author: User
Tags centos
CentOS 7.x System network card naming rules are redefined, may be "eno167777xx", and so on, we will change the network card name to eth0 this.

First, cd/etc/sysconfig/network-scripts/ #进入网卡配置目录

MV eno16777736 Ifcfg-eth0 #修改名称

VI eth0 #编辑
Name=eth0 #修改
Device=eth0 #修改
: wq! #保持退出

Second, Vi/etc/sysconfig/grub #编辑

Add a "net.ifnames=0 biosdevname=0" to the "grub_cmdline_linux" variable

: wq! #保存退出
Third, the operation command:grub2-mkconfig-o/boot/grub2/grub.cfg #重新生成grub配置并更新内核参数

Iv. rules for adding udev

Create a network adapter rule "70-persistent-net.rules" in the "/ETC/UDEV/RULES.D" directory and write the following statement:

subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:dc:dd:ad", attr{type}== "1", kernel== "eth*" , name= "Eth0"
#ATTR {address}== "00:0c:29:dc:dd:ad" is the MAC address of the NIC
Cd/etc/udev/rules.d
VI 70-persistent-net.rules #添加
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:dc:dd:ad", attr{type}== "1", kernel== "eth*" , name= "Eth0"

: wq! #保存退出

Shutdown-r now #重启系统

Nic has been changed to eth0
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.