I have a Pi running a version of raspbian 64bit.

It works on my home network and my previous hotel network. However, different week, different hotel and my pi starts kicking up this error: Temporary failure in name resolution.

I boot, log in, ping google.com fine. Then I try to do something a little more stressful with the network and boom. Errors. Killing the app still doesn't allow me to ping out.

It is the same network as which my tablet is on (which I am using to write this). This seemingly doesn't get any errors - I can stream Netflix on it. Also using fing to perform a speed check is fine from my mobile.

Is there a checklist of things I can do to reinforce the connection to be more resilient?

Update: Would giving myself a fixed up address help? I see that I am usually assigned so if I manually give myself that address what would I use for the internal router. I did a traceroute but that only returned external IP addresses. Is there a way of finding the router IP?


3 Answers 3


I don't know if the issue that I had is identical to your issue, but I was struggling with similar issues whenever a sudo call was made. I would get a message stating:

sudo: unable to resolve host *myhostname*. Temporary failure in name resolution

Turns out that even though I had changed the hostname of my device using raspi-config, the hosts file still had a reference to the old name raspberrypi.

I did the following:

sudo nano /etc/hosts

And looked for the line starting with and changed this from rapberrypi to the correct hostname. After making this change my network connection was finally stable.


Try setting up your RPi to use Google DNS (, see here) instead of whatever the network suggests.

  • Done that. Still get temporary failures. I also get failed to start Raise network interfaces. Without that line it gets the green at boot. Commented Jan 7, 2019 at 18:42
  • Also resolve.conf already has nameserver in it. Commented Jan 7, 2019 at 18:47

I had the same problem when I set up an static IP so I changed the DNS. I resolve adding to /etc/dhcpcd.conf the google dns. static domain_name_servers=

  • That answer has already been given and it didn't work.
    – Chenmunka
    Commented Nov 23, 2021 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.