编辑 /etc/systemd/resolved.conf 文件,添加 DNS Server

TEXT
DNS=10.0.0.1 192.168.0.1

重启 resolved 服务

Bash
systemctl restart systemd-resolved

创建服务生成的解析文件软链接到系统解析文件

Bash
ln -fs /run/systemd/resolve/resolv.conf /etc/resolv.conf