Last Updated: February 25, 2016
· jessethegame

Set a .local hostname on a Raspberry Pi

This guide will set you up to access your Raspberry Pi on your local network through


For an extremely verbose guide, see enabling &

Enable raspberrypi.local

Install the mDNS daemon

sudo apt-get install avahi-daemon

Configure a custom hostname

Edit the hosts file and change

sudo vim /etc/hosts

Change the name on the last line       raspberrypi

Edit the hostname file

sudo vim /etc/hostname

Change the name on the only line


Apply the new hostname

sudo /etc/init.d/

Reboot for effect

sudo reboot