Home  >  Article  >  Operation and Maintenance  >  Change the network card name ens33 to eth0 under rhel and centos7

Change the network card name ens33 to eth0 under rhel and centos7

PHP中文网
PHP中文网Original
2017-07-13 18:16:322610browse

Tips for using Linux

Complete some common problems encountered in Linux.

Modify the network card ens33 to eth0

When using RHEL and Centos7, I found that the network card name has changed to EnoX, which is quite strange. Now change it back to the old name eth0 which looks pleasing to the eye.


  1. Back up the /etc/sysconfig/Change the network card name ens33 to eth0 under rhel and centos7 file
    cp /etc/sysconfig/Change the network card name ens33 to eth0 under rhel and centos7 /etc/sysconfig/Change the network card name ens33 to eth0 under rhel and centos7.bak
  2. Edit /etc/sysconfig/Change the network card name ens33 to eth0 under rhel and centos7 file
    vim /etc/sysconfig/Change the network card name ens33 to eth0 under rhel and centos7
    Add
    net.ifnames=0 biosdevname=0
    within the double quotes after GRUB_CMDLINE_LINUX As shown in the figure after adding, the order within the quotation marks has no effect
    Change the network card name ens33 to eth0 under rhel and centos7
    Pay attention to the spaces between each parameter.
  3. Rebuild the GRUB configuration file
    Change the network card name ens33 to eth0 under rhel and centos72-mkconfig -o /boot/Change the network card name ens33 to eth0 under rhel and centos72/Change the network card name ens33 to eth0 under rhel and centos7.cfg
  4. Back up the network card configuration file and change the network card file to eth0
    cp /etc/sysconfifg/network-scripts/ifcfg-ens33 /etc/sysconfifg/network-scripts/ifcfg-ens33.bak
    mv /etc/sysconfifg/network-scripts/ifcfg-ens33 /etc/sysconfifg/network-scripts/ifcfg-eth0
    ens33 may be different from yours. To be specific, check your own ensx with ifconfig first.
  5. Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file
    vim /etc/sysconfig/network-scripts/ifcfg-eth0
    Just change the NAME and DEVICE from the original ens33 to eth0.
  6. Just restart the system.

The above is the detailed content of Change the network card name ens33 to eth0 under rhel and centos7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn