At the weekend at home to learn docker,win10 top of the virtual machine, ubuntu18.04, suddenly execute apt-get update error, domain cannot parse, suspect is a DNS file problem, toss a long time, all kinds of Baidu, modify DNS file, still error, ping Www.baidu.com error. Again began to wonder if the network itself is a problem, modify the network configuration, still does not work.
To the system error keyword search, try to provide the method of users to fail;
Later, the search "ubuntu18.04 virtual machine can not be networked", suddenly, see a blog, finally solved the problem, hahaha;
Reprinted links: 80873542
The specific methods are recorded as follows:
1. Questions
In the previous period of time also normal Internet, users suddenly unable to network. It is possible to run the software, burst the memory, did not crash, but caused the network interruption.
Try measures:
1. Check the host host, the network can be normal
2. Linux ifconfig display, no fixed IP
$ifconfigLo:flags= the<UP,LOOPBACK,RUNNING> MTU65536inet127.0.0.1Netmask255.0.0.0Inet6::1Prefixlen -ScopeID0x10Loop Txqueuelen +(Local Loopback) RX packets3859bytes232955(232.9KB) RX Errors0Dropped0Overruns0Frame0TX Packets3859bytes232955(232.9KB) TX Errors0Dropped0Overruns0Carrier0Collisions0
- Ping connection cannot be connected on
$Ping www.baidu.comping: www.baidu.com:Name or service not known
- Originally for the host mode, the replacement of the bridge model, the other mode, is also unable to connect.
2 workaround
- To adjust the mode to "host mode"
- Enter the following code
sudo service network-Manager stopsudorm /var/lib/networkmanager/ sudo service Network-manager start
- Enter Ifconfig again, and the previous static IP reappears. Problem solving, can be networked.
3. Delete the above content and restart the network
$Cat ~/software/networkmanager.state [main]networkingenabled=false wirelessenabled=truewwanenabled=true
The specific reasons are still unknown, I hope someone can guide, or one day I can understand. Come on
ubuntu18.04 virtual Machine Suddenly does not work on the Internet solution