Solaris 11: Changing the hostname

Check the current environment properties:

# svccfg -s system/identity:node listprop config
config                 application        
config/enable_mapping boolean     true
config/nodename       astring     hostname
config/loopback       astring     hostname


Set the new hostname: 

# svccfg -s system/identity:node setprop config/nodename="newhostname"
# svccfg -s system/identity:node setprop config/loopback="newhostname"


Refresh the properties:

# svccfg -s system/identity:node refresh


Restart the service:

# svcadm restart system/identity:node


Verify that the changes took place:

# svccfg -s system/identity:node listprop config
config                 application
config/enable_mapping boolean     true
config/nodename       astring     newhostname
config/loopback       astring     newhostname