虚拟机无法ping通其他主机&主机不能ping通虚拟机【解决方案】

在安装redis时不知道怎么的, linux ping www.baidu.com 出不来了;
重启网卡报错

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.

  

解决:

[root@localhost ~]# systemctl stop NetworkManager
[root@localhost ~]# systemctl disable NetworkManager
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager-wait-onl
ine.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
[root@localhost ~]# systemctl restart network
[root@localhost ~]#

[root@localhost ~]# service network restart
Restarting network (via systemctl):                        [  OK  ]
[root@localhost ~]#

 

 

转自:https://blog.csdn.net/Smile__1/article/details/90733532

posted @ 2022-08-23 00:50  zhangqi0828  阅读(95)  评论(0编辑  收藏  举报