resolvconf set dns 1

resolvconf set dns

sudo systemctl disable systemd-resolved.service
sudo gedit /etc/resolvconf/resolv.conf.d/head 
# add
nameserver 8.8.8.8
nameserver 8.8.4.4

sudo resolvconf --enable-updates
sudo resolvconf -u

Here is what the above code is Doing:
1. Disable systemd-resolved.service
2. Add Google’s DNS servers to the top of the resolv.conf file
3. Enable resolvconf to update the resolv.conf file
4. Update the resolv.conf file

Similar Posts