Page 1 of 1

[SOLVED] Change Hostname

PostPosted: May 24th, '12, 01:37
by cuz2000m
How can I change the hostname in Mageia 2 RC.
I added HOSTNAME= in /etc/sysconfig/network and also added hostname in /etc/hosts. It worked in Mageia 1.

Thanks Cuz.

Re: Change Hostname

PostPosted: May 24th, '12, 12:25
by roadrunner
You also need to change it in /etc/hostname

-- Martin

Re: Change Hostname

PostPosted: May 24th, '12, 14:02
by cuz2000m
Thanks for the response.
It seems to already be changed there. At least on my laptop. My konsole prompt still says localhost for my user name but it actually displays the hostname when I su to root. And it tells me the correct hostname when I type hostname at the prompt. Is there somewhere else I need to change it?

Thanks
Cuz.

Re: Change Hostname

PostPosted: May 24th, '12, 14:05
by jkerr82508
Did you log out and log in again after changing the hostname?

Jim

Re: Change Hostname

PostPosted: May 24th, '12, 14:14
by cuz2000m
Thanks for the quick response.
I had restarted earlier and had no change. On this occasion, it worked.

Thanks for the help.
Cuz.

Re: [SOLVED], Change Hostname

PostPosted: Jun 30th, '12, 09:19
by PiElle
In etc/hostname, is better to add the new name or to change it? :?:

Re: [SOLVED], Change Hostname

PostPosted: Jun 30th, '12, 10:23
by doktor5000
PiElle wrote:In etc/hostname, is better to add the new name or to change it? :?:


If you prefer for your computer to have a split personality, then you should add it :D

Just kidding - you should change the hostname, not add a new one.

Re: [SOLVED] Change Hostname

PostPosted: Jun 30th, '12, 10:45
by PiElle
Thanks doktor5000 ... (better be sure with hostnames ... ;) ) ...
To be more precise, though, I meant if I have to keep the word "localhost" or delete it in the /etc/hostname file ...

Re: [SOLVED] Change Hostname

PostPosted: Jun 30th, '12, 20:09
by martinw
PiElle wrote:To be more precise, though, I meant if I have to keep the word "localhost" or delete it in the /etc/hostname file ...

Delete it in /etc/hostname, but leave it in /etc/hosts.

Re: [SOLVED] Change Hostname

PostPosted: Jul 1st, '12, 13:09
by PiElle
martinw wrote:
PiElle wrote:To be more precise, though, I meant if I have to keep the word "localhost" or delete it in the /etc/hostname file ...

Delete it in /etc/hostname, but leave it in /etc/hosts.

Yes, that's right.
I perfectly agree with you and doktor5000 ... :)