編輯網卡設定檔
vi /etc/network/interfaces
auot eth0
iface eth0 inet static
address 192.168.2.66
netmask 255.255.255.0
gateway 192.168.2.254
重啟網卡
/etc/init.d/networking restart
查看 IP
ip a
ifconfig
vi /etc/network/interfaces
auot eth0
iface eth0 inet static
address 192.168.2.66
netmask 255.255.255.0
gateway 192.168.2.254
/etc/init.d/networking restart
ip a
ifconfig