View previous topic :: View next topic |
Author |
Message |
bluephoenix Tux's lil' helper

Joined: 01 Nov 2008 Posts: 94
|
Posted: Thu Oct 30, 2014 8:22 am Post subject: [Solved] I cannot change my HOSTNAME |
|
|
I am using systemd instead of openrc.
I try to change the hostname in /etc/hostname file, but there is no effect. Even I delete /etc/hostname, there is nothing changed (the old hostname displays).
If I use "#hostname" command, the hostname will be changed, but certainly everything will be the same after booting.
So I don't know how to change it now.
Thank you for your advice!
Last edited by bluephoenix on Thu Oct 30, 2014 10:48 am; edited 1 time in total |
|
Back to top |
|
 |
bluephoenix Tux's lil' helper

Joined: 01 Nov 2008 Posts: 94
|
Posted: Thu Oct 30, 2014 10:39 am Post subject: |
|
|
sorry, I should say the hostname configure file locates /etc/conf.d
I just made mistake in the previous post and now I still cannot solve the problem. |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3632
|
|
Back to top |
|
 |
bluephoenix Tux's lil' helper

Joined: 01 Nov 2008 Posts: 94
|
Posted: Thu Oct 30, 2014 10:51 am Post subject: |
|
|
I solved the issue by edit the "Default hostname" in the kernel configuration - "General setup". And then everything get fine.
Thanks everybody! |
|
Back to top |
|
 |
bluephoenix Tux's lil' helper

Joined: 01 Nov 2008 Posts: 94
|
Posted: Thu Oct 30, 2014 11:08 am Post subject: |
|
|
And I do confirm systemd is using hostname file in /etc folder but not /etc/conf.d
Systemd's tool - hostnamectl can change the hostname permanently while it does change the content of /etc/hostname.
Just one thing I don't know if it is a bug. When I use "hostnamectl set-hostname" command and input the hostname with capital letter, and finally the command will write the file with lowercase letter and thus the hostname will be lowercase after booting for sure. And I do prefer to use capital letter to align with my other computers so I have to edit /etc/hostname by hand. |
|
Back to top |
|
 |
|