Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# centos7中没有eth0解决方案 #48

Open
YIngChenIt opened this issue Jul 27, 2020 · 0 comments
Open

# centos7中没有eth0解决方案 #48

YIngChenIt opened this issue Jul 27, 2020 · 0 comments

Comments

@YIngChenIt
Copy link
Owner

YIngChenIt commented Jul 27, 2020

centos7中没有eth0解决方案

在安装centos时候输入ifconfig的时候发现没有出现eth0,但是有ens33

1

然后换进入磁盘路径 cd /etc/sysconfig/network-scripts/,发现没有eth0的配置文件

2

接下来我们将ifcfg-ens33文件重命名ifcfg-eth0mv ifcfg-ens33 ifcfg-eth0

然后编辑ifcfg-eth0文件 vi ifcfg-eth0

namedevice修改为eth0

3

编辑加载启动项的配置 vi /etc/default/grub

添加参数net.ifnames=0 biosdevname=0

4

运行命令grub2-mkconfig -o /boot/grub2/grub.cfg 更新环境参数

然后重启就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant