linux change hostname

Shell
sudo nano /etc/hostname
sudo nano /etc/hosts
sudo reboot
Source

Also in Shell: