Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to change the name of network card in Centos7 system

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to change the name of the network card in the Centos7 system". In the daily operation, I believe that many people have doubts about how to change the name of the network card in the Centos7 system. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to change the name of the network card in the Centos7 system". Next, please follow the editor to study!

1. After the system has been installed, your network card may be named like this!

2. First, edit the configuration file vi / etc/sysconfig/network-scripts/ifcfg-eno16777736 of the network card and change the NAME entry to eth0.

3. Go ahead and rename the profile.

4. Then, disable the predictable naming convention. For this, you can pass the kernel parameters of "net.ifnames=0 biosdevname=0" at startup. This is done by editing / etc/default/grub and adding "net.ifnames=0 biosdevname=0" to the GRUBCMDLINELINUX variable.

Run the command grub2-mkconfig-o / boot/grub2/grub.cfg to regenerate the GRUB configuration and update the kernel parameters.

6. In fact, by step 5, the restart in ifconfig should have taken effect. According to the FAQ of Centos's official WIKI, if you have multiple interfaces and want to control their device names, instead of letting the kernel name it in its own way, it is necessary to create / etc/udev/rules.d/XXX-net.rules rules! So let's create rules here, too.

Note: the net rule name of the previous system is 70-persistent-net.rules, here I also define the rule according to that name!

7. Restart the system and verify!

Note: if the minimal installation of the Centos7 system does not have the ifconfig command, it can be solved by installing net-tools.

At this point, the study on "how to change the name of the network card in the Centos7 system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report