In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Today, I would like to share with you the relevant knowledge points about how linux modifies the name of the network card to eth0. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.
Methods: 1, rename the name of the network card configuration file to eth0;2, use the vi command to change the NAME parameters in the network card file to eth0;3, disable the network card naming rules; 4, add the udev network card rules; 5, use the "grub2-mkconfig" command to update the grub configuration parameters; 6, restart the system.
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How to change the name of the network card to eth0 by linux
Methods / steps:
1. First, rename the Nic profile name to eth0:
Cd / etc/sysconfig/network-scripts/mv ifcfg-eno1677736 ifcfg-eth0
two。 Secondly, edit the modified network card file: vi ifcfg-eth0
Change the NAME parameter to the same name as the network card file: NAME=eth0
3. Next, disable the network card naming rules.
This function is controlled by the / etc/default/grub file, which can be disabled by adding "net.ifnames=0 biosdevname=0" to the file.
Vim / etc/default/grub;GRUB_CMDLINE_LINUX= "rd.lvm.lv=rhel/root crashkernel=auto rd.lvm.lv=rhel/swap vconsole.font=latarcyrheb-sun16 vconsole.keymap=us net.ifnames=0 biosdevname=0 rhgb quiet"
4. Add udev network card rule
Create a network card rule 70-persistent-net.rules file in the / etc/udev/rules.d directory.
Vim / etc/udev/rules.d/70-persistent-net.rules
Write the following parameters to the file:
SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "MAC address of the Nic whose name needs to be modified", ATTR {type} = = "1", KERNEL== "eth*", NAME= "eth0"
5. Execute the grub2-mkconfig-o / boot/grub2/grub.cfg command to generate updated grub configuration parameters.
Successful verification of 6.reboot restart system
These are all the contents of the article "how to change the name of the network card to eth0 by linux". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.