How to change computer name

Joe-Cho joecho at everestkc.net
Sat Feb 1 04:28:14 CST 2003


I found that out what it need to be done in order to change the name on
Solaris.

There are a couple of files needed to be changed;

/etc/hosts
/etc/nodename
/etc/hostname.eri0 ( in my case, most system would be hme0 or others for
extension).
Of course, temporarily name changing would be simply  hostname "you-name-it"

Thanks anyway,
sorry to bother with this stuff.

-----Original Message-----
From: owner-kclug at marauder.illiana.net
[mailto:owner-kclug at marauder.illiana.net]On Behalf Of Duane Attaway
Sent: Friday, January 31, 2003 8:59 PM
To: Joe-Cho
Cc: kclug at kclug.org
Subject: Re: How to change computer name

On Fri, 31 Jan 2003, Joe-Cho wrote:

> I thought changing compute name on Solaris is just changing /etc/hosts,
> but it is not simple.

It is simple!  Just do it the way init scripts do it.

Your init scripts set the hostname of your computer with the contents in
/etc/hosts with the "hostname" command:

hostname this.is.my.domain.com

This changes the hostname for the computer; however, this does not
automatically change the HOSTNAME environment variable in each currently
opened shell.  New shells will inherit the the new hostname, but
applications may still grab the old hostname from currently existing
terminals.  Manually change this with:

export HOSTNAME=this.is.my.domain.com

...if you don't wish to restart your terminals.

--
Why drive a car when you can ride a bike?
http://dattaway.org                 http://counter.li.org   user #142150




More information about the Kclug mailing list