DNS配置系统默认启用了systemd-resolved服务,所以需要先禁用,然后再配置DNS解析。禁用systemd-resolved服务,只需要运行一次即可。 Choose here javascripttypescripthtmlcssshellpythongolangjavacc++c#phprubyswiftkotlinscalarustdartelixirhaskellluaperlrsql systemctl disable systemd-resolved echo "nameserver 114.114.114.114" > /etc/resolv.conf