Have you ever got this issue: Cannot access the Internet because of the "Temporary failure in name resolution" issue even you has already reset up the DNS from Ubuntu UI, restart the network service, and reboot the machine, all not working.
Here is the solution:
sudo vi /etc/resolv.conf
File: /etc/resolv.conf
----
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1 # keep this one
nameserver 8.8.8.8 # insert this
nameserver 8.8.4.4 # insert this