Centos7 change Nic name to eth style

Source: Internet
Author: User
1. open/etc/sysconfig/grub, # vim/etc/sysconfig/grub. the content is as follows: GRUB_TIMEOUT = 5GRUB_DISTRIBUTOR = & quot; $ (sed & #39; s, release. * $, g & #39;/e

1. open/etc/sysconfig/grub,

# Vim/etc/sysconfig/grub

The content is as follows:

GRUB_TIMEOUT = 5

GRUB_DISTRIBUTOR = "$ (sed's, release. * $, g'/etc/system-release )"

GRUB_DEFAULT = saved

GRUB_DISABLE_SUBMENU = true

GRUB_TERMINAL_OUTPUT = "console"

GRUB_CMDLINE_LINUX = "vconsole. keymap = us crashkernel = auto vconsole. font = latarcyrheb-sun16 rhgb quiet"

GRUB_DISABLE_RECOVERY = "true"

 

2. modify the GRUB_CMDLINE_LINUX value in the preceding content and add net. ifnames = 0 biosdevname = 0.

# Vim/etc/sysconfig/grub

The modified content is as follows:

GRUB_TIMEOUT = 5

GRUB_DISTRIBUTOR = "$ (sed's, release. * $, g'/etc/system-release )"

GRUB_DEFAULT = saved

GRUB_DISABLE_SUBMENU = true

GRUB_TERMINAL_OUTPUT = "console"

Grub_javasline_linux = "vconsole. keymap = us crashkernel = auto vconsole. font = latarcyrheb-sun16net.ifnames = 0 biosdevname = 0 rhgb quiet"

GRUB_DISABLE_RECOVERY = "true"

 

3. run: grub2-mkconfig-o/boot/grub2/grub. cfg

Then, restart the system, and the NIC name becomes eht0.

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.