VirtualBox linux virtual machine cannot connect to the Internet and ifconfig fails

Because of the needs of class, I installed an Ubuntu virtual machine with virtualBox. After installing it, it is a problem to surf the Internet. I don’t have a network cable in my hand. I want to manually configure the virtual machine with ip via wireless. The bridge situation encountered two problems:

1. ifconfig failed

2. My windows10 needs to modify the attributes and activation permissions of netman and netprofm to open the network and sharing center to view the computer's network configuration, which is particularly cheating.

This problem is a bit annoying, you must first change the attributes in the registry with administrator rights

2.1.win+r enter regedit to open the registry editor (back up the registry before operating)

2.2. Expand HKEY_CLASSES_ROOT\AppID, find and right-click the application ID of netman, click Permissions, click your current account, check full control, if it can’t be applied, click Advanced, the owner in the upper left corner, click Change, enter your current account, click Click OK after checking the name, and then set full control

2.3.win+x Open the control panel, enter the management tool in the upper right corner, find the component service, right click to run as an administrator, expand the component service → computer → my computer → DCOM configuration, find the application ID of netman, right click on properties , Switch to the Security tab, check the definition of startup and activation permissions, click Edit, check local startup and local activation, click OK

Then go back to DCOM and find the security tab of netprofm, and click Edit in the permissions to modify the permissions. But I did not make it out after a long time.
 

Then the ifconfig of Linux still doesn’t work. I found that many people encountered this problem on the Internet. Switch root and the system reminded me to use sudo apt-get install net-ttols to install a package, but because of my virtual machine, it won’t be installed at all. I can’t install it on the Internet, and there is no Internet. I didn’t send any source list to the virtual machine when I found it on the host. I was anxious. After walking for 5 kilometers, I made a network cable back and forth, plugged it in, and the virtual machine can go online. sudo apt -get install net-tools still does not work, the error message is impossible to locate package net-tools.

Here is the first interruption to access the Internet with limited Linux virtual machines:

In the virtualbox configuration, the network selects wire-plugged, NAT mode

Just check wire-plugged in the linux network settings.

 

I can't locate net-tools. I googled it. Some said that the source list should be replaced directly, and some were based on the official Ubuntu help documentation. I tried the latter.

sudo apt-get updatewithsudo apt install net-tools

The first command says something dpkgis locked. Forgive me for having a bad memory. The reason for this dpkgis that this is to prevent two programs from modifying it at the same time and causing conflicts to be locked. I modified it in the virtual box. The virtual machine is not restarted after network configuration. Then restart it. After restarting, sudo apt-get update顺利完成(有网络了下载东西就是块!),sudo apt install net-tools有点问题,说dpkg interrupted, 按照给的提示操作,sudo dpkg --configure -a re-configured and finished.

At this time, my ifconfig is finally ready.

Guess you like

Origin blog.csdn.net/michellechouu/article/details/108657037