1. ip 静态配置
$sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 192.168.0.1 192.168.0.2
$sudo /etc/init.d/networking restart
2. hostname 配置
$sudo vi /etc/hostname
ubuntu