歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Ubuntu Linux >> VirtualBox虛擬機Ubuntu下如何設置無線上網

VirtualBox虛擬機Ubuntu下如何設置無線上網

日期:2017/3/6 9:27:00   编辑:Ubuntu Linux

VirtualBox虛擬機Ubuntu下如何設置無線上網


VirtualBox虛擬機Ubuntu下如何設置無線上網


VirtualBox虛擬機Ubuntu下如何設置無線上網

本機使用無線網,未插入網線

查看無線上網網卡

設置virtualbox網絡>網卡

進入虛擬機
$cd /etc/network/
$ ls
if-down.d if-post-down.d if-pre-up.d if-up.d interfaces interfaces.d
$ vim interfaces
interfaces文件內容如下
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto enp0s3
iface enp0s3 inet dhcp
網卡是enp0s3或eth0無所謂,enp0s3是Ubuntu16.04的新屬性。dhcp是動態獲取IP地址
查看無線網所使用網段、網關等信息
打開物理機的CMD命令行,獲取IP信息
ipconfig/all

紅色勾勒區域需要寫入interfaces文件
將interfaces文件修改如下
# 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換成static,動態獲取IP換成靜態獲取;網關可以設置多個;其它一一對應填寫即可,照葫蘆畫瓢即可。
完成

Virtualbox虛擬機Ubuntu下如何設置無線上網

Virtualbox 虛擬機 Ubuntu 無線上網設置

http://xxxxxx/Linuxjc/1145154.html TechArticle

Copyright © Linux教程網 All Rights Reserved