1、修改 /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.2.1
gateway 192.168.2.254
netmask 255.255.255.0
ubuntu10.04中这个文件不能有注释,多余的行的。
2、设置DNS
修改这个文件:/etc/resolv.conf
3、sudo /etc/init.d/networking restart
1、修改 /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.2.1
gateway 192.168.2.254
netmask 255.255.255.0
ubuntu10.04中这个文件不能有注释,多余的行的。
2、设置DNS
修改这个文件:/etc/resolv.conf
3、sudo /etc/init.d/networking restart