restart the network service:
service networking restartWhen I give the above command I get something like
stop: Unknown instance:
networking stop/waitingI would like to know if the network services has restarted or is it showing some errors. if it is an error how to rectify it?
22 Answers
After editing /etc/network/interfaces, the usual way to get the system to re-read the file and use the changes is to do:
sudo ifdown wlan0 && sudo ifup wlan0Of course, substitute the relevant interface if it's not wlan0.
I assume Network Manager is not present on this system. If it is, you are better off to make your changes there rather than /etc/network/interfaces.
7Please be aware that starting with Ubuntu Server 16.04, you need to use the ip command to flush the interface address before restarting networking, otherwise changes in the interfaces file will not take effect.
IMPORTANT: If you are doing this through an SSH connection, it's important that you chain the commands together as shown below, because you may lose the connection to the server immediately after you flush the network interface.
sudo ip addr flush interface-name && sudo systemctl restart networking(Source)
1