Click to See Complete Forum and Search --> : Change Hostname


theprince
09-06-2003, 11:19 AM
Hey,

This must be a simple thing for Linux pros so I'll appreciate any help.

I get a wierd long name for my host name (Welcome to ....) and after I login as root, I go su and change the host name with : "hostname -v myname".

Now it's all fine until I reboot and get the old long name again.

How can I change the host name forever?

Thanks,
Amir.

serz
09-06-2003, 11:26 AM
What distro are you using? The file you need to edit is usually /etc/HOSTNAME but in some distros this is different.

Icarus
09-06-2003, 11:36 AM
For Red Hat

edit /etc/sysconfig/network
add new host name at the end of the localhost line in /etc/hosts


NETWORKING=yes
HOSTNAME=SeitchTabr

127.0.0.1 SeitchTabr localhost.localdomain localhost

theprince
09-06-2003, 12:29 PM
Yes, I do have RH 9.0

Thanks...

I will try that.