I have a Pi3 in my LAN. If I ping it from my Ubuntu machine using its ip address I get an answer. If I do the same using its hostname I get this:

Destination Host Unreachable

Does anyone know what I can do to resolve the hostname properly?

  • If you type host <hostname> what IP do you get? Is it different from the IP you are pinging?
    – Andy Smith
    May 26, 2016 at 9:42
  • That's weird, it shows me two ip addresses: pi.fritz.box has address and pi.fritz.box has address
    – Rotareti
    May 26, 2016 at 9:44
  • No problem, glad you got it working!
    – Andy Smith
    May 26, 2016 at 10:12

2 Answers 2


Thanks to the tip of Andy Smith I found out there was an old device listed in my fritz.box:

$ host pi
pi.fritz.box has address
pi.fritz.box has address

The one with .53 was old.. I removed it from the fritz.box and now it works fine.


For those who read this and do not have the same issue as Rotareti, try installing avahi and samba on your raspberri pi, and it worked like a charm for me.

    sudo apt-get install avahi-daemon
    sudo apt-get install samba
  • The issue for me was that windows machines were not being able to resolve host name of the raspberry pi. Samba helped to get host name resolved for windows machines.
    – anjana
    Apr 7, 2018 at 2:25

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.