1

Using Netatalk, I am able to mount my Raspberry Pi on my Mac by typing open afp://mypi.local in Terminal. I would like to be able to access the Pi without always having to type in ".local".

Trying open afp://mypi results in an error message:

There was a problem connecting to the server "mypi".

Similarly, ping mypi.local works but ping mypi results in an error:

ping: cannot resolve mypi: Unknown host.
Anaksunaman
  • 16,718
  • 4
  • 38
  • 45
crazjo
  • 123
  • 5
  • Try "mypi." with a trailing dot; see [this answer](https://superuser.com/questions/1385021/local-hostname-not-working-without-the-trailing-dot) – kabZX Apr 10 '20 at 10:14
  • Adding a trailing dot did not work.. – crazjo Apr 10 '20 at 11:12
  • Have you tried just putting `mypi` in your `hosts` file? – Anaksunaman Apr 10 '20 at 11:58
  • `.local` means name resolution is currently working with mDNS. Unless you set up name resolution (`hosts` file, DNS server, whatever) to resolve `mypi` to the desired IP address, this won’t work. – Daniel B Apr 10 '20 at 12:00
  • Thanks for your comment. My raspberry pi hosts file `/etc/hosts` contains `127.0.1.1 mypi` and the file /etc/hostname contains `mypi` so not sure what else to do. – crazjo Apr 10 '20 at 14:35
  • 1
    `/etc/hosts` is local to each computer, so adding "mypi" to `/etc/hosts` on the Pi only has any effect *on the Pi*, not on the Mac. You'd need to add it to the `/etc/hosts` file on the Mac to do what you want. – Gordon Davisson Apr 10 '20 at 16:31

0 Answers0