Set the hostname on Raspbian

To access your Raspberry Pi via its hostname:

sudo apt-get install avahi-daemon
sudo nano /etc/hosts

Change the hostname in the line 127.0.1.1 to your hostname:

127.0.0.1 localhost
127.0.1.1 <hostname>
sudo nano /etc/hostname

change the hostname to your hostname:

<hostname>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s