vim /etc/sysconfig/grub ,在倒数第二行添加如下代码

net.ifnames=0 biosdevname=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=centos/root rd.lvm.lv=centos/swap rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"

执行命令 grub2-mkconfig -o /boot/grub2/grub.cfg

grub2-mkconfig -o /boot/grub2/grub.cfg
[root@centos2 /etc/sysconfig]grub2-mkconfig  -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-957.27.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-957.27.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-862.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-e1b070e76db146fbb48e981539ac34c6
Found initrd image: /boot/initramfs-0-rescue-e1b070e76db146fbb48e981539ac34c6.img
done

重命名网卡名称

mv ifcfg-ens33 ifcfg-eth0
vim ifcfg-eth0 DEVICE改为eth0

重启服务器查看网卡名称是否改变

最新文章

  1. 【转载】C/C++中extern关键字详解
  2. 详细说说 Google Test Certified 的各级——Level 1
  3. ACPI I/O resource conflict with SMBus
  4. C++中的运算符重载
  5. iOS7(iPhone4)button不能改变button的title
  6. MySQL配置文件路径及‘The total number of locks exceeds the lock table size’问题
  7. C#中枚举类型和int类型的转化
  8. 实现一个类 Vue 的 MVVM 框架
  9. shell编辑crontab任务
  10. RecyclerView实现瀑布流效果(二)
  11. android.database.sqlite.SQLiteException: no such column: aaa (code 1): , while compiling: DELETE FROM users WHERE user_name=aaa解决办法
  12. window中常用的命令
  13. 出现Unable to locate appropriate constructor on class 错误可能的原因
  14. Swift 里的指针
  15. iOS 技术篇:__VA_ARGS__实现自定义NSLog
  16. [基础架构]PeopleSoft Web Server 重要文件说明
  17. C# 接收form表单中多个相同name值的问题
  18. Geodetic集合
  19. sql添加字段说明
  20. MyBatis入门及CRUD

热门文章

  1. Base64(3)
  2. 【Linux】walle 部署上线单报错:mv: cannot overwrite directory ‘/www’ with non-directory
  3. PAT 甲级 1075 PAT Judge (25分)(较简单,注意细节)
  4. 使用EF 4.1的DbContext的方法大全
  5. redis密码配置
  6. Go语言中的值类型和引用类型
  7. 解决ScrollView嵌套百度地图滑动冲突
  8. vue-cli构建的项目手动添加eslint配置
  9. SpringBoot系列教程之Redis集群环境配置
  10. mybatis 一对一 一对多 多对多