Linux网络异常:ping: www.baidu.com: Name or service not known解决方案
解决Linux网络异常,ping不通百度。
·
解决centos7 ping: www.baidu.com: Name or service not known
1、网络配置查看
记住这三个地址
2、编辑Linux中的网络配置文件
vi /etc/sysconfig/network-scripts/ifcfg-ens33
内容替换如下:
3、重启网络服务
service network restart
centos7好像要这个命令:systemctl restart network
4、DNS文件配置
vi /etc/resolv.conf
5、测试
centos7重启网络服务命令出错
Restarting network (via systemctl): Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
[FAILED]
错误解决可以尝试下把NetworkManager关闭了 然后在输入重启命令重启网络服务
systemctl stop NetworkManager
更多推荐
已为社区贡献1条内容
所有评论(0)