I recently needed to change the name of my Linux Operating System server, it is a Debian Lenny 5.0 Stable, what I did to make the change permanently is to run this line.

sudo vim /etc/hostname

And add something like this in there:

www.go2linux.org

Then I run the /etc/init.d/hostname.sh script, and that is, to test it run:

uname -n

or

hostname -a