Change the nic name of centos7 to eth0

Source: Internet
Author: User
Because we often switch between centos6 and centos7, we feel that the nic name of centos7 is too long and inconvenient, so we want to change the nic name to eth0 which is the same as that of centos7, eth1, perform the following operations: 1. # cd/etc/sysconfig2. add the following sentence to the longest line # vimgrubnet. ifnames = 0 biosdevn

Because we often switch between centos6 and centos7, we feel that the nic name of centos7 is too long and inconvenient, so we want to get the same name as 6.

If you want to change the network card name to eth0 and eth1, perform the following operations:

1. # cd/etc/sysconfig

2. add the following sentence to the longest line.

# Vim grub

Net. ifnames = 0 biosdevname = 0

3. # grub2-mkconfig-o/boot/grub2/grub. cfg

4. rename the original Nic name
# Cd/etc/sysconfig/network-scripts

# Mv ifcfg-enoXXXXXXXX ifcfg-eth0

5. modify the NAME in the ifcfg-eth0, the device name is eth0

NAME = eth0

DEVICE = eth0

6. reboot and check that the eth0 we want has been created.

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.