systemctl restart network重启网络失败报错:RTNETLINK answers: File exists

centos虚拟机之前使用很好。一次修改本机网卡配置中的固定ip地址后,重启网络(systemctl restart network)报错:RTNETLINK answers: File exists
通过journalctl -xe查看相关日志systemctl restart network重启网络失败报错:RTNETLINK answers: File exists_第1张图片
对于centos系统,管理网络启停的服务除了systemctl外,还有NetworkManager。这两者都对网络进行启停的话可能造成冲突。
解决方案:停止NetworkManger对网络启停的管理,命令:

systemctl disable NetworkManager
systemctl stop NetworkManager

再一次用systemctl重启网络:

systemctl restart network

OK了(成功截图略)。
参考文献:
1.https://www.jianshu.com/p/c6db4c075c41
2.http://www.360doc.com/content/16/0902/15/7991404_587785370.shtml
3.https://blog.csdn.net/u012834750/article/details/80501440

你可能感兴趣的:(linux)