Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 601 Bytes

ubuntu-dns-configure.md

File metadata and controls

37 lines (26 loc) · 601 Bytes

method 1

edit /etc/systemd/resolved.conf then run:

systemctl restart systemd-resolved
systemctl enable systemd-resolved
mv /etc/resolv.conf /etc/resolv.conf.bak
ln -s /run/systemd/resolve/resolv.conf /etc

method 2

Install the resolvconf package:

sudo apt-get install resolvconf

Edit the /etc/resolvconf/resolv.conf.d/head file:

sudo nano /etc/resolvconf/resolv.conf.d/head

Add the DNS servers:

nameserver 1.1.1.2
nameserver 1.0.0.2

Enable and start the resolvconf service:

sudo systemctl enable --now resolvconf.service