Re: hostname command
Arne Brodowski <[email protected]> Mon, 02 Apr 2007 13:56:38 +0200
| Newsgroups | gmane.linux.trustix.general |
|---|---|
| Message-ID | <[email protected]> |
lore wrote: > 2007/4/2, Arne Brodowski <[email protected]>: >> lore wrote: >>> hi all, >>> does anybody could tell me what really append when i run 'hostname >>> myserver_name'? >>> Because /etc/hosts and /etc/sysconfing/network don't change. >>> Only change the name at the beginning of the command line when i do a >> new >>> login... >>> >>> thanks a lot >>> >>> lorenzo >>> >> Hi Lorenzo, >> >> the hostname command changes the hostname of the running system, to make >> the change permanent you have to change the value in >> /etc/sysconfig/network (the line with HOSTNAME=<value>). >> >> At boot time the script /etc/rc.sysinit reads /etc/sysconfig/network and >> uses the hostname command to set the hostname of the system to the value >> of the HOSTNAME variable in that file. > > > so, if I use 'hostname server_name', but i don't change the > /etc/sysconfig/network file nothing happens at next restart of the > machine...is it right? > > > > best regards, >> Arne > > > thanks > > correct, then the machine will keep it's old hostname.