说明
每次重启网络dns就会被覆盖127.0.0.53,域名就会解析失败。这是systemd-resolvd的问题,直接关闭就行。
vi /etc/resolv.conf
nameserver 8.8.8.8
vim /etc/NetworkManager/NetworkManager.conf
在plugins下面加一行
dns=default
保存然后重启
sudo systemctl restart NetworkManager
然后停止systemd-resolved服务,并关闭开机自启动
systemctl stop systemd-resolved
systemctl disable systemd-resolved