2012-06-15

Ubuntu Server修改IP

sudo vi /etc/network/interfaces

修改檔案內容:
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx #IP
netmask xxx.xxx.xxx.xxx #子網路遮罩
gateway xxx.xxx.xxx.xxx #Gateway
dns-nameservers 168.95.1.1 168.95.192.1
dns-search do.main

存檔後重新啟動網路:
sudo /etc/init.d/networking restart