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

Re: rename a machine

>      Can anyone tell me how to _Permanently_ change the hostname on my 
>      machine ???
>      If I issue the hostname command: hostname newname
>      the node name is set to newname - HOWEVER after a reboot the original 
>      name returns.

The host name of a machine is stored in /etc/hostname.  This file is read by
/etc/init.d/boot at boot time.  Change it here and it's "permanent".

>      Where is this info written ?

I don't know that it is.  Whenever I'm wondering about this kind of thing
(and how I found the information I needed to answer your question), I
usually start by cd'ing to /etc and using fgrep on the contents of it and
its subdirectories...  This has the added benefit of throwing up instances
of what you want to change that you might not have thought about.  For
instance, on the Debian machine I tried this on, the host name also appears
in the following files:


Your mileage may vary...


Warwick Harvey                                    email: warwick@cs.mu.OZ.AU
Department of Computer Science                        phone: +61-3-9287-9171
University of Melbourne                                 fax: +61-3-9348-1184
Parkville, Victoria, AUSTRALIA 3052     web: http://www.cs.mu.OZ.AU/~warwick

Reply to: