If you need to add additional
nameservers to your
resolv.conf because of DNS related issues, you'll want to use a package that manages the file at
/etc/resolv.conf. This is because on system restart, the file will be overwritten by other processes and you will lose any previous changes.
sudo apt update
sudo apt install resolvconf
Check if it is running
sudo systemctl status resolvconf
Enable the service.
sudo systemctl enable resolvconf.service
/etc/resolvconf/resolv.conf.d/head and add the nameservers you want.
Save the changes and then restart the service.
sudo systemctl restart resolvconf
/etc/resolv.conf to verify your nameservers have been added now.
If so, you are all set!