Usually this is an easy task using the hostname
command:
[root@blah ~]# hostname blah [root@blah ~]# hostname florian [root@blah ~]# hostname florian
But on some distributions, this procedure is not modifying the hostname permanently.
On Debian based systems you must:
1. edit /etc/hostname and put there whatever hostname you want to set;
2. run /etc/init.d/hostname.sh start
on RedHat based systems you have to:
1. edit /etc/sysconfig/network
and put on HOSTNAME stanza whatever you want.
2. Reboot.
You can modify the hostname also via sysctl command:
to read: sysctl kernel.hostname
to modify: sysctl kernel.hostname=blah