ubuntu18.04 virtual machine Suddenly can't solve the problem of Internet

Source: Internet
Author: User

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
    1. Ping connection cannot be connected on
$Ping  www.baidu.comping: www.baidu.com:Name or service not known
    1. Originally for the host mode, the replacement of the bridge model, the other mode, is also unable to connect.
2 workaround
    1. To adjust the mode to "host mode"
    2. Enter the following code
sudo service network-Manager stopsudorm /var/lib/networkmanager/   sudo service Network-manager start
    1. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.