Tuesday, September 2, 2008

How to change Solaris hostname


# hostname newhostname

edit these files as well:

/etc/hosts
/etc/nodename
/etc/hostname.xxxn

Look in these files, but chances are you won't need to make changes:

/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
/etc/inet/ipnodes (if this file exists and if a hostname entry exists)

[don't forget to change /etc/defaultrouter if need be]
[don't forget to change /etc/netmasks if need be]

1 comment:

ElCoyote_ said...

Granted, this works on most if not all current and past Solaris release, but I think the supported way of doing that is 'sys-unconfig'..

Chances are that other files might need to be changed in the future (think /etc/boot, maybe) and you're likely to miss these if you manually edit the files.