raspi: change hostname
do the following:
- sudo vim /etc/hosts
- change last line: 127.0.1.1 XYZ
- where XYZ should be the new name you want
- sudo vim /etc/hostname
- replace the name in this file with the new name
- sudo /etc/init.d/hostname.sh
- sudo reboot
src: howtogeek.com