setting up hostname in RH9
Hello
Im trying to setup a hostname of RH 9 and everytime I set it up it gets reseted back to localhost.localdoamain. I used the "hostname" command to set it up. ANy help appreciated thnx. |
You must also edit /etc/hosts file.
|
No
vi /etc/sysconfig/network Set it in there Seabass |
I edited the /etc/hosts
added my hostname on the same line as the localhost And it Works! thnx y'all |
I agree with Seabass, adding it to /etc/hosts will work,
but it is better to add it to /etc/sysconfig/network. Add a line: HOSTNAME=<my_hostname> |
Is /etc/sysconfig/network a RH specific file ?? :scratch:
Becouse I use Slackware and the only file that contains my hostname is /ect/HOSTNAME (of course) and /etc/hosts. (Well there is also /etc/resolv.conf - but that is a different story). Thank you |
I actually found out that adding the hostname to /etc/hosts doesn,t set the hostname properly.After restarting the hostname gets resetted back localhost.localdomain.Thats because in /etc/sysconfig ,the line for hostname says localhost.localdomain.
So I added the hostname to /etc/sysconfig/network and added it to the /etc/hosts Even after restarting the machine the hostname stays the same... I wanna thank y'all for helping! |
Reply concerning lfur's question
Yes.
/etc/sysconfig/network is RedHat specific and I believe Mandrake also. I could be mistaken. Anyways, I took me a while to figure that one out. |
Madrake does it differently I believe.
Oh and...I told you it would work :-P |
I know it does.
I agreed with you in an earlier post, remember ? :) |
All times are GMT -5. The time now is 09:49 PM. |