You can change hostname by editing file /etc/hostname
root@fwhwin:~# vi /etc/hostname
Then you will get an output like:
Replace the current host name with the desired new name.
Save and close the file.
Then You need to edit the /etc/hosts file, enter:
# vi /etc/hosts
Change all old hostname with newer one:
127.0.0.1 localhost 127.0.1.1 fwhwin # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Save and close the file. Then reboot the system.