When installing kali, you get to choose a hostname, but in case you accepted the default hostname (kali) and later want to change it, here’s a How to guide to change hostname in Kali Linux.
Step 1: edit hostname file
Open hostname file from /etc directory and modify the name in there.
nano /etc/hostnameSave the file.
Step 2: edit hosts file
Open hosts file from /etc directory and modify the name in there.
nano /etc/hostsSave the file.
Step 3: reboot
Now reboot to reflect your changes
reboot
And you should see the new
hostname
coming up in terminal (i.e. root@iExplo1t
)