问题:使用systemctl restart network 或 service network restart 命令重启网卡失败,如下所示。

[root@localhost ~]# systemctl restart network 
Failed to restart network.service: Unit network.service not found.
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# service network restart
Redirecting to /bin/systemctl restart network.service
Failed to restart network.service: Unit network.service not found.

解决:

1、可以尝试使用以下命令:

service network-manager restart

2、如果是 Kali Linux(Debian),则需要用以下命令:

service networking restart

3、如果是Centos 8,则需要用以下命令:

nmcli c reload

 

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐