CentOS7解决可ping通网络,但重启网络报Job for network.service failed because the control process exited with error

加粗样式
CentOS7解决可ping通网络,但重启网络报Job for network.service failed because the control process exited with error
在经过systemctl stop NetworkManager
systemctl disable NetworkManager
systemctl enable NetworkManager
或者修改Mac地址、重启操作仍无法解决情况下


解决办法:①先用ip addr 查看自己都有哪些网卡,它们都是叫什么名字


比如:CentOS7解决可ping通网络,但重启网络报Job for network.service failed because the control process exited with error
我的centos7就两个网卡,一个叫lo,L另一个叫ens32


②查看/etc/sysconfig/network-scripts下,将其余无关的网卡位置文件全删掉,避免不必要的影响,即只留下你的网卡存在的
ifcfg- 开头的文件
CentOS7解决可ping通网络,但重启网络报Job for network.service failed because the control process exited with error
③删除不用网卡名命令:rm -y ifcfg-网卡名(是你用ip addr 命令没有显示的网卡名)


以上就大功告成,亲测可用,欢迎读者使用,希望能给予大家一点帮助。