Example for TIMMS with a serial number SN00200 in the command line use “sudo vi /etc/hostname TIMMS-SN00200” without parentheses “sudo vi etc/hostname TIMMS-SN00200”.
Alternate Method:
use command “sudo raspi-config”
select “System Options”
select “Hostname”
Follow prompts and reboot (You will be prompted to do so.)
After reboot, you can check that the hostname changed with the command “hostname” , which will return the hostname of your Raspberry Pi