---
title: "VirtualBox中安装Ubuntu Server本机网络配置"
author: "hypercube1024"
date: "2010-09-03T00:29:58Z"
tags: []
categories: ["操作系统"]
slug: "virtualbox-ubuntu-server"
draft: false
lastmod: "2010-09-03T00:29:58Z"
id: 754106
url: "https://hypercube1024.iteye.com/blog/754106"
---

1，首先在虚拟机当中开启第二块网卡，并且使用bridge方式连接

2，/etc/network/interfaces中添加
# eth1
auto eth1
iface eth1 inet static
address 192.168.1.101
netmask 255.255.255.0
broadcast 192.168.1.255

3，在/etc/resolv.conf添加
nameserver 8.8.8.8
nameserver 192.168.1.1

4，sudo /etc/init.d/networking restart 重启网络之后，从windows ping 192.168.1.101就可以ping通了，服务器开了 ssh 的话，windows就可以用ssh登陆了