vipupg
Last Updated: February 25, 2016
·
1.457K
· 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

http://raspberrypi.local

For an extremely verbose guide, see enabling &
changing

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

127.0.1.1       raspberrypi

Edit the hostname file

sudo vim /etc/hostname

Change the name on the only line

raspberrypi

Apply the new hostname

sudo /etc/init.d/hostname.sh

Reboot for effect

sudo reboot