linux网卡名称修改
2024-10-21 13:21:21
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
重启服务器查看网卡名称是否改变
最新文章
- 【转载】C/C++中extern关键字详解
- 详细说说 Google Test Certified 的各级——Level 1
- ACPI I/O resource conflict with SMBus
- C++中的运算符重载
- iOS7(iPhone4)button不能改变button的title
- MySQL配置文件路径及‘The total number of locks exceeds the lock table size’问题
- C#中枚举类型和int类型的转化
- 实现一个类 Vue 的 MVVM 框架
- shell编辑crontab任务
- RecyclerView实现瀑布流效果(二)
- android.database.sqlite.SQLiteException: no such column: aaa (code 1): , while compiling: DELETE FROM users WHERE user_name=aaa解决办法
- window中常用的命令
- 出现Unable to locate appropriate constructor on class 错误可能的原因
- Swift 里的指针
- iOS 技术篇:__VA_ARGS__实现自定义NSLog
- [基础架构]PeopleSoft Web Server 重要文件说明
- C# 接收form表单中多个相同name值的问题
- Geodetic集合
- sql添加字段说明
- MyBatis入门及CRUD
热门文章
- Base64(3)
- 【Linux】walle 部署上线单报错:mv: cannot overwrite directory ‘/www’ with non-directory
- PAT 甲级 1075 PAT Judge (25分)(较简单,注意细节)
- 使用EF 4.1的DbContext的方法大全
- redis密码配置
- Go语言中的值类型和引用类型
- 解决ScrollView嵌套百度地图滑动冲突
- vue-cli构建的项目手动添加eslint配置
- SpringBoot系列教程之Redis集群环境配置
- mybatis 一对一 一对多 多对多