Click to See Complete Forum and Search --> : Setting my hostname


Delilah
10-22-2001, 01:16 PM
Hey All,

How the heck do I set the hostname on my RedHat 7.1? I use "hostname Delilah" and still get "localhost" set after reboot. Am I missing something?

Thanks Much

Bagpuss
10-22-2001, 02:38 PM
There is a file called hosts or something in the /etc directory, that has the local..... stuff in it maybe if u edit that it will stay. linuxconf also has a feature to let u change this i think :D

Delilah
10-22-2001, 02:48 PM
Thanks,

I edited the /etc/hosts file last night to no avail. I'll give it another try and see what happens.

bdg1983
10-22-2001, 03:57 PM
Are you changing the hostname as root?

If that doesn't work, then just edit /etc/HOSTNAME and make the change there.

Delilah
10-22-2001, 04:05 PM
Yep, trying to edit as root. I'll try the /etc/HOSTNAME Thanks much

lm72
10-22-2001, 07:20 PM
try as root using netcfg and set hostname that but editing the file /etc/HOSTNAME should have done it.


Regards,

Alex :)

[ 22 October 2001: Message edited by: lm72 ]

bdg1983
10-22-2001, 07:30 PM
/etc/HOSTNAME is for your own hostname.

/etc/hosts - The static table lookup for host names

lm72
10-22-2001, 08:11 PM
You are right !

Sorry my mistake :)

Alex

subnet_rx
10-22-2001, 09:20 PM
/etc/sysconfig/network-scripts/ and then edit the appropriate file for the device you connect with. In my case, ifcfg-eth0

DHCP_HOSTNAME=

Delilah
10-23-2001, 05:39 PM
Thanks for the info everyone.