Centos8 Could not restart the Network: Failed to restart network.service: Unit network.service not found

Error:

[root@centos8 ~]# service network  status
Redirecting to /bin/systemctl status network.service
Unit network.service could not be found.

[root@centos8 ~]# systemctl status network.service
Unit network.service could not be found.

[root@centos8 ~]# systemctl status network
Unit network.service could not be found.

[root@centos8 ~]# systemctl restart network
Failed to restart network.service: Unit network.service not found.

After installing Centos8, configure the static IP address. If you want to restart the network, the previous commands on Centos7 are hard to use

Error reported as above

After checking the data, it is found that the original network has been replaced by Centos8. The new version is called NetworkManager

This tool is amazing and easy to use. especially those related to wifi,

So you can restart with this command: systemctl restart NetworkManager

[root@centos8 ~]# systemctl status  NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-10-15 22:20:43 CST; 9min ago
     Docs: man:NetworkManager(8)
 Main PID: 7299 (NetworkManager)
    Tasks: 3 (limit: 11357)
   Memory: 6.8M
   CGroup: /system.slice/NetworkManager.service
           └─7299 /usr/sbin/NetworkManager --no-daemon

 

Read More: