Ubuntu系统固定静态IP
编辑:/etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto enp1s0
iface enp1s0 inet static
address 192.168.0.99
netmask 255.255.255.0
gateway 192.168.0.1
DNS配置
修改:/etc/systemd/resolved.conf 在【resolve】中加入DNS地址即可。
[Resolve]
DNS=192.168.0.1
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes