1. 程式人生 > >ubuntu-14.04修改網路為靜態ip

ubuntu-14.04修改網路為靜態ip

cd /etc/network

interfaces檔案

cat interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
#auto lo
#iface lo inet loopback

auto eth0
iface eth0 inet static
#iface eth0 inet dhcp
address 192.168.0.4
netmask 255.255.255.0
gateway 192.168.0.1