On Tue, May 07, 2002, Amir Tal wrote about "Re: Nicknames for my Hostname": > change your hostname to eliran by typing "hostname eliran" > they type "hostname" to see the new name. logout, login and you are all set. > tal.
No. I don't understand why you insist on "correcting" the advice I gave with an incorrect one. The effect of the "hostname" command will only last until the next reboot, where the init scripts will set the name "localhost" for him - I assume that's not what he wants. This will happen at least in RedHat, and I would guess in most other distributions. Remember, one important principle of Unix and Linux kernels is that the kernel should not read the filesystem on its own. It shouldn't care, for example, if the hostname is saved in "/etc/hosts" or "/etc/sysconfig/network" or "/etc/hostname". It is the job of the distribution's init scripts (that run during boot) to read this information from some file and tell the kernel about this (in this case, by the sethostname(2) system call). The code that sets the hostname on boot sits in /etc/rc.d/rc.sysinit (take a look). It reads /etc/sysconfig/network, takes the HOSTNAME there and sets runs hostname on it (or "localhost" if no name is defined). I couldn't find anything that saves the current hostname during shutdown to be used on the next bootup. Not that it can't be done - but I don't think it's done, at least not on Redhat. So you'll have to modify /etc/sysconfig/network, or use linuxconf, like I suggested. If you believe I am wrong, please show concrete evidence (which code saves the hostname on shutdown). -- Nadav Har'El | Tuesday, May 7 2002, 26 Iyyar 5762 [EMAIL PROTECTED] |----------------------------------------- Phone: +972-53-245868, ICQ 13349191 |In case of emergency, this box may be http://nadav.harel.org.il |used as a quotation device. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]