在 Ubuntu 升级到 20.04 之后,/etc/resolv.conf包含:
nameserver 127.0.2.1
Run Code Online (Sandbox Code Playgroud)
它不起作用。改为:
nameserver 127.0.0.53
Run Code Online (Sandbox Code Playgroud)
但是每次重新启动后它都会被覆盖,我必须重新更改它。
我已经在这个盒子里安装了 Ubuntu 15.10,定期升级它,这是解析器第一次出现这样的错误。淘气!
如何永久解决这个问题?
编辑:
的输出$ ls -al /etc/resolv.conf:
lrwxrwxrwx 1 root root 29 lis 1 2015 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
Run Code Online (Sandbox Code Playgroud)
内容/etc/resolv.conf:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual …Run Code Online (Sandbox Code Playgroud)