ubuntu里面的 resolv.conf 文件
上面那个修改没有用。
请使用下面那个 resolved.conf 进行修改。
然后重启域名解析服务
systemctl restart systemd-resolved
systemctl enable systemd-resolved
备份当前的/etc/resolve.conf,并重新设置/run/systemd/resolve/resolv.conf 到/etc/resolve.conf的软链接
mv /etc/resolv.conf /etc/resolv.conf.bak ln -s /run/systemd/resolve/resolv.conf /etc/