How to change the hostname
If you own more than a Raspberry Pi and you want connect them in a network, you have to assign each of them a different name, called hostname. By default, the hostname of a Raspberry Pi is raspberrypi. In this example you will replace it with raspberry01.
In order to do this you need to follow some steps.
Change the contents of the hostname file, replacing raspberrypi with the new name raspberry01.
$ sudo nano /etc/hostname
Change the content of the hosts file, replacing raspberrypi with the new name raspberry01.
$ sudo nano /etc/hosts
Finally, you can change the hostname, assigning it the new name raspberry01.
$ sudo hostname raspberry01