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

  • 相关阅读:
    封装微信小程序
    请求formdata格式
    基于vue的前端框架
    es6 入门
    测试缓存时间问题console.time
    export 与 export default, 以及import引用
    vue emit 实现非父子之间的值传递
    css3 弹性盒子display:flex
    iview $modal 的封装
    render iview tab select的添加和input的添加
  • 原文地址:https://www.cnblogs.com/shayumeng/p/11558500.html
Copyright © 2011-2022 走看看