linux系统修改网卡名称为eth0
1、修改系统grub
[root@localhost ~]#vi /boot/grub/grub.conf #在内核参数后面添加biosdevname=0
:wq #保存退出

2、修改70-persistent-net.rules的网卡命名规则配置文件
[root@localhost ~]#vi /etc/udev/rules.d/70-persistent-net.rules #修改此服务器有1张网卡,识别出的网卡名字为:em1,我们需要把上面的em1修改为eth0。
:wq #保存退出

3、修改当前网卡配置文件名称
[root@localhost ~]#cd /etc/sysconfig/network-scripts/ #进入网卡配置文件目录
[root@localhost ~]#mv ifcfg-em1 ifcfg-eth0 #重命名

4、修改网卡配置文件内容,把em全部修改改为eth
[root@localhost ~]#cd /etc/sysconfig/network-scripts/ #进入网卡配置文件目录
[root@localhost ~]#vi ifcfg-eth0 #修改里面的em1为eth0
:wq #修改完成后,保存退出
重启网卡

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:181
阅读量:45
阅读量:155
阅读量:53
阅读量:106