Temporary failure resolving – sudo apt-get update in ubuntu

If you are trying to update ubuntu respository and getting error:

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg  Temporary failure resolving ‘us.archive.ubuntu.com’

just check the DNS.

Set the Google DNS (8.8.8.8) in /etc/resolvconf/resolv.conf.d/base

then

After this procedure, I was able to resolve hostnames and