在qemu下应该dhcp,下面第一个改动可以不必,而且win的防火墙也应该关闭。。。。貌似
但是dns得改,一般情况下,ubuntu不能上网是因为dns的问题,切记是/etc/resolv.conf
其实不用重起,dns的改动也起作用。
——————————————————————————————————
编辑/etc/network/interfaces文件
命令:
root用户下执行
vim /etc/network/interfaces
把 iface eth0 inet dhcp
改为:
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.1
保存退出
执行:
vim /etc/resolv.conf
显示的是:nameserver 192.168.0.1
删除nameserver 192.168.0.1
编辑:
nameserver (参照windows上的第一个DNS)
nameserver (参照windows上的第二个备用DNS)
保存退出,执行reboot从启后,就可以上网了
本文介绍如何在Ubuntu系统中通过修改网络设置实现正常上网的方法,包括更改网络接口为静态IP地址及正确配置DNS服务器。
412

被折叠的 条评论
为什么被折叠?



