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

Centos modifies the default network card to eth0

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

About modifying the DEVICE= parameter in the network card configuration file about eth0TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticDEFROUTE=yesIPV4_FAILURE_FATAL=yesIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=eth0DEVICE=eth0ONBOOT=yesIPADDR=192.168.100.43NETMASK=255.255.255.0GATEWAY=192.168.100.1DNS1=114.114.114.114~ modifying the network card file name mv ifcfg-eno16777728 ifcfg-eth0

Because CentOS7 is booted by grub2, you also need to modify grub2 and edit / etc/default/grub configuration file. Add net.ifnames=0 biosdevname=0GRUB_TIMEOUT=5GRUB_DISTRIBUTOR= "$(sed's, release. * $) after the parameter GRUB_CMDLINE_LINUX. G'/ etc/system-release) "GRUB_DEFAULT=savedGRUB_DISABLE_SUBMENU=trueGRUB_TERMINAL_OUTPUT=" console "GRUB_CMDLINE_LINUX=" crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swaprhgb quiet net.ifnames=0 biosdevname=0 "GRUB_DISABLE_RECOVERY=" true "regenerate the GRUB configuration with the grub2-mkconfig command and update the kernel [root@localhost ~] # grub2-mkconfig-o / boot/grub2/grub.cfgGenerating grub configuration file. Found linux image: / boot/vmlinuz-3.10.0- 327.el7.x86_64Found initrd image: / boot/initramfs-3.10.0-327.el7.x86_64.imgFound linux image: / boot/vmlinuz-0-rescue-4dd6b54f74c94bff9e92c61d669fc195Found initrd image: / boot/initramfs-0-rescue-4dd6b54f74c94bff9e92c61d669fc195.imgdone restart init 6

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