How to change host name (hostname)

Hi,
I want to change my GoPiGo’s host name from raspberrypi.local or dex.local to something else. I am gonna connect more than one GoPiGos at the same time on same Wifi network, so I need different host names for all. How can I change the host name?
Thanks in advance.

-Harpreet

Hey Harpreet,
I’m in the process of writing a howto on this, it’s really easy. First, tell me which version of the Raspbian for Robots do you have?
John

Hi John,

I have installed Dexter Industrie’s modified “wheezy” image from http://www.dexterindustries.com/howto/install-raspbian-for-robots-image-on-an-sd-card/. It’s default host name is dex and password is robots1234.

-Harpreet

Hey Harpreet, great, that’s the latest then. It’s super easy to change the hostname. In the file /boot/hostname(edit: hostnameS! It must be plural!) if you open it in nano, it should say “dex”. You can change it to anything you want there (no spaces). Save the file, reboot. Then reboot a second time, and your new hostname will be the new hostname.

best, John

Hi john,

Yes, It works!!
It was actually very easy. Thanks for the solution John.
I Appreciate it.

-Harpreet

Other documentation on the site refers to /boot/hostnames (not /boot/hostname).

Hi Chris, I see my mistake, it’s “/boot/hostnames” plural, with the s at the end. I updated it above. Is there anywhere else in the documentation where it was done singular not plural?