To manage/secure your hosts, it is good idea to change hostname.

Let’s change for Debian based system.

1. Change hostname file

Check your current hostname with

$ hostname

To modify permanant, modify hostname file (/etc/hostname)

$ sudo nano /etc/hostname

Put your preferred hostname, save and exit.

2. Change hosts file

Also you will need to modify hosts file (/etc/hosts)

$ sudo nano /etc/hosts

You will find ipv4 127.0.1.1 and hostname raspberry or raspberrypi.

Modify hostname as you like.

Reboot</b> your system and check your hostname.

$ hostname