ubuntu restart network service code example

Example 1: how to restart the network in ubuntu

$ sudo service network-manager restart

Example 2: linux restart all network interfaces

sudo service network-manager restart

Example 3: debian network restart

# sudo /etc/init.d/networking restart
or
# sudo /etc/init.d/networking stop
# sudo /etc/init.d/networking start
else
# sudo systemctl restart networking

Example 4: network manager restart ubuntu

sudo service network-manager restart

Example 5: sudo systemctl restart networking

Linux Network
#To Restart network
$ sudo /etc/init.d/networking restart

#To stop and start use the following option (do not run them over remote ssh session as you will get disconnected):
$ sudo /etc/init.d/networking stop
$ sudo /etc/init.d/networking start

#Debian/Ubuntu Linux with systemd, run:
$ sudo systemctl restart networking
           or 
$ sudo systemctl restart NetworkManager.service