Strategies for Network Administration in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Set a System's Host Name


Note -  The primary interface's TCP/IP host name is a distinct entity from the system host name that you set with the hostname command. Although not required by Oracle Solaris, the same name is normally used for both. Some network applications depend on this convention.

Permanently set a system's host name as follows:

# hostname name-of-host

Initially, the hostname value is stored in config/nodename, but this value is overridden if the system is configured by using DHCP, in which case, DHCP provides the hostname value. If the hostname command is used, then hostname is the value specified in the config/nodename file. If you set a system's identity by using the hostname command, this setting cannot be overridden by DHCP until you execute the hostname command with the –D option. The corresponding SMF properties and the associated SMF service are also automatically updated when you use the hostname command. See the hostname (1) man page.