Originally published at: http://www.howtogeek.com/167195/how-to-change-your-raspberry-pi-or-other-linux-devices-hostname/
The default hostname for the Raspberry Pi is, creatively enough, “raspberrypi“. What if you want a different hostname or you want to avoid hostname conflicts on your local network? Read on as we show you how to quickly change the hostname of a Linux-based device.
On some ditros,
/etc/HOSTNAME is used rather than
/etc/hostname. Slackware is one such distro, (but if you use Slackware, you probably already knew that.)
And also, just to be technical. There is no default hostname for the Raspberry Pi, but there is a default hostname for each distro.
You'll also need to add a line to /etc/hosts or the Pi will ask you to login on bootup. You need these 2 lines --
::1 MyWeatherPi ip6-localhost ip6-loopback
Format these just like the existing 127.0.0.1 localhost lines
This topic is now closed. New replies are no longer allowed.