A system's host name is specified in several different locations.
Remember to update your name service database to reflect the new host name.
Use the following procedure to change or rename a system's host name.
You can also use the sys-unconfig command to reconfigure a system, including the host name. For more information, see the sys-unconfig(1M) man page.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Change the system's host name in the following files:
/etc/inet/ipnodes – Applies only to some release Solaris releases.
Starting with the Solaris 10 8/07 release, there is no longer two separate hosts files. The /etc/inet/hosts file is the single hosts file that contains both IPv4 and IPv6 entries. You do not need to maintain IPv4 entries in two hosts files that always require synchronization. For backward compatibility, the /etc/inet/ipnodes file is replaced with a symbolic link of the same name to the /etc/inet/hosts file. For more information, see the hosts(4) man page.
(Optional) If you are using a name service, change the system's host name in the hosts file.
Rename the host name directory within the /var/crash directory.
# cd /var/crash # mv old-host-name new-host-name
Reboot the system to activate the new host name.
# init 6