Solution: the network can be recovered only when the Ubuntu broadband is disconnected

If you set the broadband connection in /etc/network/interfaces , sometimes you need to disconnect the network for some work operations. At this time, you will find that when you want to reconnect the network, you can't connect successfully as we wish, you can only manually restart the network service or restart the computer

Command to restart the network service manually:

sudo service network-manager restart

perhaps

sudo systemctl restart NetworkManager.service

For the convenience of future operation, you can create a reconnect in the home directory_ network.sh The contents are as follows

#!/bin/bash
sudo service network-manager restart

Then run the command sudo Chmod + X connect_ network.sh grant executable permission
after the network is disconnected, you only need to run ./reconnect on the terminal_ network.sh , you can connect to the network again


Read More: