1. 程式人生 > >RHEL7修改網絡卡名稱為eth0的步驟

RHEL7修改網絡卡名稱為eth0的步驟

1)修改網絡卡配置檔案並改名

cd/etc/sysconfig/network-scripts/

mvifcfg-eno16777736 ifcfg-eth0

viifcfg-eth0

NAME=eth0

2)修改grub檔案並重新生成grub配置檔案

  vim /etc/default/grub

GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/rootcrashkernel=auto  rd.lvm.lv=rhel/swapvconsole.font=latarcyrheb-sun16 vconsole.keymap=us net.ifnames=0 biosdevname=0rhgb quiet

"

grub2-mkconfig-o /boot/grub2/grub.cfg

3)設定udev檔案--可以省略

vim/etc/udev/rules.d/70-persistent-net.rules

SUBSYSTEM=="net",ACTION=="add",DRIVERS=="?*",ATTR{address}=="00:0C:29:7C:96:05",ATTR{type}=="1",KERNEL=="eth*",NAME="eth0"

4)重啟

reboot