1.打开virtualbox,选择【设置】-【网络】将连接方式改为【Bridged Adapter】 2.在Ubuntu中, 运行 [code lang="php"]sudo gedit /etc/network/interfaces[/code] 修改如下: [code lang="php"]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 #此处改成您的网关[/code] 运行 [code lang="php"]sudo gedit /etc/resolv.conf[/code] 修改如下: [code lang="php"]nameserver 172.17.11.31 #域名服务器[/code] 3.运行/etc/init.d/networking restart 重启