VirtualBox中安装Ubuntu Server本机网络配置
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登陆了