If you are having "Temporary failure resolving" error when you update your operating system. Please do the following:
1. Login to SSH
2. Edit the resolved.conf file (nano /etc/systemd/resolved.conf)
3. Uncomment the #
DNS= line. (Remove the # in the front of the line)
4. Add your DNS resolver. Example: DNS=8.8.8.8
5. Save the file (CTRL+X and then Y)
6. Restart the resolver (service systemd-resolved restart
)
Alternatively run the following command on SSH:
sed -i 's/#DNS=/DNS=8.8.8.8/' /etc/systemd/resolved.conf && service systemd-resolved restart