Ubuntu18.04 修改DNS

打开如下文件:

sudo vim /etc/systemd/resolved.conf

打开文件后在文件内写入:

[Resolve] DNS=119.29.29.29

保存退出后运行:

systemctl restart systemd-resolved.service

THE END