Quantcast




A new version of the software that powers this site is now available for beta testing at Pyplate. Check out the installation instructions, and build your own Raspberry Pi powered site. Now includes seven free themes.

Follow me on Twitter and Google+

Google+







submit to reddit       
       

Change your Raspberry Pi's hostname

Computers have hostnames so that they can be addressed by a human readable name as well as by their IP address. The default hostname for your Raspberry Pi is raspberrypi.

You might want to change it if you have more than one Pi, or just to make your Pi your own. Changing the hostname is very easy. You just need to open two files, /etc/hosts and /etc/hostname, and replace the word raspberrypi with your chosen hostname. These files are owned by root, so you need to open them as root. I changed my Pi's hostname to rpi. The contents of /etc/hostname is simply

rpi

/etc/hosts should look like this:

127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 127.0.1.1 rpi

Reboot your Pi using this command:

sudo reboot

When you open a terminal, the prompt should look like this:

pi@rpi ~$

Comments

Comments

comments powered by Disqus