Ubuntu is not the first Linux system I installed. My first system is centos, but I gave up because I didn't connect to the Internet one morning. Use Ubuntu instead.
We recommend that you use the bridge mode when using Ubuntu to access the Internet on the VM. That is, the bridge mode is used for VM installation without any changes in Ubuntu.
1. Why not use the NAT mode,
I personally tested that using the NAT mode, the virtual machine can ping each other with the host, and the browser can access the Internet. Note:The VM cannot ping the internet.It is not about DNS resolution, but about IP sharing.
Therefore, try not to use the NAT mode when using it. Of course, host-only is rarely used.
2. When bridging, the system prompts that the network cannot be changed to bridging: no host network has been Bridges
Edit the virtual network configuration under the virtual machine. The error message is displayed:
Cannot change network to bridged: there are no un-bridged host network adapters
The network cannot be changed to a bridge: no host network adapter has been Bridges
As a result, the bridge mode cannot be selected. This is mainly because the network adapter is not successfully identified (bridge to will be blank here)
The major cause of this problem is that there are other virtual NICs in your physical host, and the solution is very simple. Uninstall the virtual Nic tool you installed and restart your computer.
After restarting, go back to the virtual network Editor interface again and click Restore Default in the lower left corner to initialize the network settings.
Now you can select the bridge to option to locate your specified physical network.
Try a simple solution:
The following message is displayed when you click Edit on the VM> Virtual Network editor> briged:
Cannotchange network to bridged: there are no un-bridged host networkadapters
The network cannot be changed to a bridge: no host network adapter has been Bridges
Click Restore Default and wait until the default status is restored.
3. You can ping the Internet IP address, but cannot Ping www.baidu.com.
This is of course a DNS resolution problem. Use VI to open/etc/resolv. conf.
Add nameserver 8.8.8.8 (Google domain name)
How to access the Internet and pay attention to Ubuntu In the VM