1、ubuntu系统修改IP地址:sudo vim /etc/network/interfaces
auto eth0
iface eth0 inet static /默认的是DHCP的,修改成为static
address 60.173.26.79
netmask 255.255.255.224
gateway 60.173.26.65
2、ubuntu系统修改DNS: sudo vim /etc/resolv.conf
nameserver 202.102.192.68
3、使网络生效:sudo /etc/init.d/networking restart
Ubuntu8.04虚拟机更换host主机后开机无法加载网卡,提示:No such device
删除缓存文件,重启后解决。
sudo rm /etc/udev/rules.d/70-persistent-net.rules
reboot