码迷,mamicode.com
首页 > 系统相关 > 详细

VirtualBox下Ubuntu利用桥接方式上网

时间:2016-09-01 10:56:52      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:

1.打开virtualbox,选择【设置】-【网络】将连接方式改为【Bridged Adapter】

2.在Ubuntu中,

运行sudo gedit /etc/network/interfaces

修改如下:

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet static

address 172.17.1.178

netmask 255.255.0.0  #此处改成您的掩码

gateway 172.17.1.111 #此处改成您的网关

运行sudo gedit /etc/resolv.conf

修改如下:

nameserver 172.17.11.31 #域名服务器

3.运行/etc/init.d/networking restart 重启

VirtualBox下Ubuntu利用桥接方式上网

标签:

原文地址:http://www.cnblogs.com/Robert-huge/p/5828590.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!