Transitioning From Oracle® Solaris 10 to Oracle Solaris 11.2

Exit Print View

Updated: December 2014
 
 

Setting a System's Host Name

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. See hostname (1) .

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 DHCP, in which case, DHCP provides the hostname value. If you use the hostname command, then the hostname is the value that is 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.