Should be enough to do:
and to change the value in /etc/hostname, however it's not...
My hosted computer come with a random hostname (hosting provider domain name then server number) that don't fit my needs. So it's very important to change this name as soon as possible, before it get spread all over the config. Grepping the /etc folder to see where is this dummy hostname used may be necessary. However, I sometime wonder where I'm allowed to change it without disturbing the provider runtime watchdog.