zoukankan      html  css  js  c++  java
  • Centos网卡名称命名

    1. vim /etc/sysconfig/grub     编辑/etc/sysconfig/grub文件

        添加  net.ifnames=0 biosname=0

    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="crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet net.ifnames=0 biosname=0"   #添加
    GRUB_DISABLE_RECOVERY="true"

    2. grub2-mkconfig -o /boot/grub2/grub.cfg      生成新的grub.cfg文件

    [root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-3.10.0-957.21.3.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-957.21.3.el7.x86_64.img
    Found linux image: /boot/vmlinuz-3.10.0-957.21.2.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-957.21.2.el7.x86_64.img
    Found linux image: /boot/vmlinuz-3.10.0-862.14.4.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-862.14.4.el7.x86_64.img
    Found linux image: /boot/vmlinuz-3.10.0-862.6.3.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-862.6.3.el7.x86_64.img
    Found linux image: /boot/vmlinuz-3.10.0-862.2.3.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-862.2.3.el7.x86_64.img
    Found linux image: /boot/vmlinuz-0-rescue-6a40cff497a2412d91bb000f9652139a
    Found initrd image: /boot/initramfs-0-rescue-6a40cff497a2412d91bb000f9652139a.img
    done

    3.mv ifcfg-enp3s0 ifcfg-eth0          执行命令   并修改 ifcfg-eth0中DEVICE = enp3s0   为  DEVICE = eth0

    4.shutdown -r 0                             重启服务验证网卡名称是否为eth0

  • 相关阅读:
    Windows10如何添加开机启动项
    selenium自动化文件上传、文件下载
    windows下创建虚拟环境
    selenium 处理js日历控件
    selenium鼠标和键盘事件
    selenium绕过某宝验证,手动验证滑块
    python国内镜像源
    Linux下jenking安装
    发送邮件
    基于python的selenium两种文件上传操作
  • 原文地址:https://www.cnblogs.com/shayumeng/p/11558500.html
Copyright © 2011-2022 走看看