傳統interfaces文件配置(適用于舊版)即便我們已經在桌面上配置了固定ip 這里也可以修改
?編輯配置文件?
修改/etc/network/interfaces(需安裝net-tools):
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*
auto eth1
iface eth1 inet static
address 192.168.5.105
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 222.222.202.202
?重啟網絡服務?