Ubuntu Server: Fail to restart networking.service: Unit network.service not found

Solution 1:

Things have changed over time. Dependent on your installation, you want to check the service names with

systemctl list-unit-files | grep -i network

And, most likely in your case, it's

systemctl restart NetworkManager