Update: Download the Bash Install Script

Many people want to use the hostname when addressing their Pi on a Mac instead of an ip address. The simple solution for this is Avahi. Avahi implements Zeroconf, mDNS, DNS-SD and RFC 3927/IPv4LL under LGPL.

Instructions for the Wheezy distribution of the Pi are pretty easy:

sudo apt-get install avahi-daemon
sudo insserv avahi-daemon //makes it automatically start

//Then create a config file: (attached my basic one)
sudo nano /etc/avahi/services/multiple.service
//There are a couple different variations of this on the web but this suits my ownCloud needs
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
        <name replace-wildcards="yes">%h</name>
        <service>
                <type>_device-info._tcp</type>
                <port>0</port>
                <txt-record>model=RackMac</txt-record>
        </service>
        <service>
                <type>_ssh._tcp</type>
                <port>22</port>
        </service>
 <service>
                <type>_http._tcp</type>
                <port>80</port>
        </service>
</service-group>

//Then restart the service 
sudo /etc/init.d/avahi-daemon restart

After waiting several minutes (or doing some reboots), your Apple product should be able to access your service at hostname.local. For most default Raspberry Pi users, the hostname will be ‘raspberrypi’ leaving you with ‘raspberrypi.local’.

If you would like to change your hostname, you have to edit it in a couple places “/etc/hosts” and “/etc/hostname” and then reboot your Raspberry Pi.