[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: WORKAROUND Re: Cannot change hostname permanently

Kent West wrote:
Chris Lale wrote:
A workaround is to change the hostname by editing /etc/hostname directly.

   # echo desktop > /etc/hostname

Yes. I understood from the original posting that the "/etc/hostname" was
being changed manually by the OP. If that's not the case, that's the
problem. This file must be changed manually.

I did try both manual change and the hostname command originally, but perhaps I did not reboot in each case - I can't remember. Subsequently, I have found that manually changing /etc/hostname does work, but using the hostname command does not work correctly. The hostname command appears to work (the hostname command reports the new hostname and a new login shows the new hostname in the prompt) but /etc/hostname retains the original name. Consequently, when /etc/init.d/hostname.sh is started (eg at boot) the old name is set as the hostname.

Also, the system seems slow and unresponsive after the name is changed with the hostname command. Eg applications from the Gnome desktop menu will not open.


Reply to: