Open the computer, found that the network icon is not connected, you want to manually click on the connection, but found that the option is gray (not optional)
Or the icon display is connected, but the browser is unable to surf the internet, also ping does not pass
This opens the terminal input
Sudo/etc/init.d/network-manager restart
(Restart network management)
And then the problem is solved.
It would be too much trouble to have such a long command on every boot, so you can give this command an individual name:
Use the editor to open the. bashrc file in your home directory (enter your home directory by typing the CD in the terminal)
Find these lines of code and add them after these lines: alias restartnetwork= ' sudo/etc/init.d/network-manager restart '
Then save the exit, and the next time you encounter a similar problem, just type restartnetwork on the terminal.
(Note: restartnetwork is my own definition of the alias, you want to use any alias can be changed.)
For example you want to use ABCD, then the alias restartnetwork= ' sudo/etc/init.d/network-manager restart ' This command is rewritten as
Alias abcd= ' sudo/etc/init.d/network-manager restart ', then save to exit
PS: Try a successful system version ubuntu16.04 only on my own computer. If there is a wrong place, welcome treatise
Ubuntu networking frequently dropped solutions