linux修改eth0

1:vim /etc/udev/rules.d/70-persistent-net.rules  把eth1的name改成eth0,然后把上面的那个eth0的删掉,eth1修改为eth0

(目的是把不符合的网卡删掉)

(2:    ifconfig eth0 up         开启(激活)eth0
    sudo dhclient eth0   更新eth0IP地址
    sudo ifconfig eth0     运行)

3:service networj restart 

4:ifconfig -a 查看ip和mac

2:vim /etc/sysconfig/network-script/ifcfg-eth0 或者vim /etc/sysconfig/network-scripts/ifcfg-eth0 编写ip和mac如果需要修改的话。

猜你喜欢

转载自blog.csdn.net/Jodl666/article/details/83721548