Change the name of your Raspberry Pi Zero W

By default, all new and fresh Raspbian installations come with the name and hostname of "raspberrypi'. If you have only one Pi, that's good enough. More than one on the network however, and you will want to have an individual name for each one. Two files need to be edited for that purposes.

Step one: SSH into your Pi and enter

sudo nano /etc/hosts

Amend the last line from 127.0.1.1 raspberrypi with the name that you want to give the Pi. Hit ^X and Enter to commit the change.


Step two: enter

sudo nano /etc/hostname

Change the entry from raspberrypi to the name that you want to give your Pi. Hit ^X and Enter to commit the changes:


Reboot the Pi. SSH into your Pi again and you should see the terminal prompt with the new name of your Pi:


Done! Your Pi now has an individualized name.

Comments

Popular posts from this blog

Accessing a NAS drive from your Raspberry Pi

Why yet another Raspberry Pi blog?

Remotely control your Raspberry Pi Zero W from your Windows computer with SSH