Setting up AFP on Ubuntu

I’m using VirtualMachines for many development tasks, as I don’t want to mess my host system. To Access the files on my machines I’m using AFP which is pretty easy to use.

This setup is based upon the work of The missing readme So this post is basically just a short reminder and howot for myself :) More informations in german.

First of alle we need to install the required services:

sudo apt-get install netatalk avahi-daemon libnss-mdns

Then we disable legacy protocols for our file server (this step is optional): Uncomment the following lines in “/etc/default/netatalk”


Add the Shares to “/etc/netatalk/AppleVolumes.default”

~/ "Home Directory" allow: cnidscheme:cdb options:usedots,upriv

Add mdns to host in /etc/nsswitch.conf

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns

Add a new services File “/etc/avahi/services/afpd.service”

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<name replace-wildcards="yes">%h</name>

If you want to change the Icon, just chaange the value of model to one of the following:

  • Xserve
  • PowerBook
  • PowerMac
  • Macmini
  • iMac
  • MacBook
  • MacBookPro
  • MacBookAir
  • MacPro
  • AppleTV1,1
  • AirPort

So then just restart the service or reboot your machine to get everything up.