How to Set up wireless Internet access in VirtualBox Virtual Machine Ubuntu
How to Set up wireless Internet access in VirtualBox Virtual Machine Ubuntu
The local machine uses wireless networks without network cables being inserted.
View Wireless Network Interfaces
Set virtualbox network> Nic
Enter Virtual Machine
$ Cd/etc/network/
$ Ls
If-down.d if-post-down.d if-pre-up.d if-up.d interfaces. d
$ Vim interfaces
The content of the interfaces file is as follows:
Source/etc/network/interfaces. d /*
Auto lo
Iface lo inet loopback
Auto enp0s3
Iface enp0s3 inet dhcp
It doesn't matter if the NIC is enp0s3 or eth0, and enp0s3 is a new attribute of Ubuntu16.04. Dhcp is used to dynamically obtain IP addresses.
View the network segments and gateways used by the wireless network.
Open the CMD command line of the physical machine to obtain the IP address information.
Ipconfig/all
The interfaces file needs to be written to the outlined area in red.
Modify the interfaces file as follows:
# This file describes the network interfaces available on your system
# And how to activate them. For more information, see interfaces (5 ).
Source/etc/network/interfaces. d /*
# The loopback network interface
Auto lo
Iface lo inet loopback
# The primary network interface
Auto enp0s3
Iface enp0s3 inet static
Address 192.168.188.101
Netmask 255.0.0.0
Network 192.168.188.0
Gateway 192.168.188.253
Dns-nameservers 8.8.8.8
Dns-nameservers 114.114.114.114
Dns-nameservers 192.168.188.253
Dhcp is changed to static, and dynamic IP addresses are changed to static ones. You can set multiple gateways. You can enter the other IP addresses one by one.
Complete
Virtualbox Virtual Machine Ubuntu wireless Internet access settings