systemctl stop systemd-resolved
systemctl disable systemd-resolved
vim /etc/systemd/resolved.conf
[Resolve]
DNS=8.8.8.8 #取消注释,增加dns
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
DNSStubListener=no #取消注释,把yes改为no
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
签名:这个人很懒,什么也没有留下!