ubuntu以DHCP方式配置网卡自动获取ip编辑文件/etc/network/interfaces:sudo vi /etc/network/interfaces并用下面的行来替换有关eth0的行:# The primary network interface - use DHCP to find our addressauto eth0iface eth0 inet dhcp
用sudo dhclient eth0更新IP地址