Linux Ubuntu virtual machine can not connect to the Internet, how to connect Linux Ubuntu virtual machine to the Internet

Host and virtual machine file transfer moves: https://blog.csdn.net/qq_38786209/article/details/79984879

notice:! ! !
There may be many reasons why the virtual machine cannot access the Internet, but if there are no special requirements and you just want to connect to the Internet as soon as possible, the following methods are recommended.

The virtual machine cannot access the Internet:
Scenario 1 : If the virtual machine is just installed, the host is connected to a wireless network (WIFI), but the virtual machine cannot access the Internet, remember to directly change the network mode to bridge mode and uncheck the copy network connection, so that Getting online right away is one of the easiest ways to get online.
As shown in the figure: Right-click on the virtual machine option, select the settings button,
write picture description here
then change the network mode to bridge mode and uncheck the duplicate network connection,
write picture description here
and then you can connect to the network immediately.
write picture description here
Situation 2 : This time I suddenly did nothing and couldn't connect to the Internet, and then I tried to find that it could be solved like this.
Workstation->Edit->Virtual Machine Network Editor->Change Settings As shown in the
figure :
write picture description here

Select Bridge Mode -> Automatically select the wireless network card of the external computer (it cannot automatically find a network card that can connect to the Internet), as shown in the figure:
write picture description here

If you don't know which is your own network card, you can view the network properties under Windows settings and find your own network card as shown in the figure:
write picture description here

Situation 3 : Still unable to connect to the Internet, the solution: open the network connection, right-click properties of the local connection "Microsoft Wi-Fi Direct Virtual Adapter #3", double-click IPv4, and change to obtain IP automatically, as shown in the figure:
write picture description here
write picture description here
Painful attempt (you can skip ): This problem bothered me for an afternoon and an evening, looking for blogs in various ways. I also heard from the teaching assistant that virtual machines are more likely to encounter various network problems, and suggested that I install dual systems. But I have tried several times, the computer does not know why, it can only boot the dual system from the U disk; if it is partitioned separately, it will freeze when restarting after the installation is successful, and then every time the boot is turned on, the screen will be black, and the dual system cannot be entered normally. It didn't work out all night. ——-Remember a painful lesson that the Ubuntu virtual machine cannot connect to the Internet.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325699269&siteId=291194637