Problem: Using the systemctl restart network or service network restart command to restart the network card fails, as shown below.
[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.
solve:
1. You can try the following commands:
service network-manager restart
2. If it is Kali Linux (Debian), you need to use the following command:
service networking restart
3. If it is Centos 8, you need to use the following command:
nmcli c reload