|Skip Navigation Links|
|Exit Print View|
|man pages section 4: File Formats Oracle Solaris 11.1 Information Library|
- local source for system name
When a machine is standalone or its IP address is configured locally, the svc:/system/identity:node SMF service has a property, namely nodename, for setting the system name.
To set the name of the node permanently use the following command:
# hostname mynodename
To set the name of the node temporarily use the following command:
# hostname -t mynodename
To see the current effective hostname:
To see the currently set nodename for the host use the following command:
$ svcprop -p config/nodename svc:/system/identity:node
The value of this property used to be located in the /etc/nodename file. If /etc/nodename is present and the SMF service property is not set, the SMF service reads /etc/nodename and populates the property.
Once the SMF service property has been set, the /etc/nodename file is removed and no longer consulted.
If the machine's network configuration is delivered by the RPC bootparams protocol, neither the SMF service property nor the /etc/nodename file are used, as the system name is delivered by the remote service.
If the machine's network configuration is delivered by the DHCP protocol, the SMF service property is used only if the DHCP server does not provide a value for the Hostname option (DHCP standard option code 12).
A system name configured in the SMF service should be unique within the system's name service domain in order to ensure that any network services provided by the system operate correctly.
Given a system name value, regardless of source, uname -S sets the system name of the running system.
If the system is installed or configured using sysconfig(1M) with a manual network configuration, /etc/inet/hosts is updated to map the nodename to the IP Address of the configured interfaces.
If the system is installed or configured with a network configuration not defined manually, /etc/inet/hosts is updated to map the nodename to the loopback entries.
If the system is installed or configured with no network interfaces, /etc/inet/hosts is updated to map the nodename to the loopback entries.
If the administrator chooses to prevent any of this mapping behavior, the administrator can set the config/enable_mapping svc:/system/identity:node service property to false in the AI install manifest.
Example 1 Syntax for the nodename File
The syntax for nodename consists of a single line containing the system's name. For example, for a system named myhost:
See attributes(5) for descriptions of the following attributes:
The nodename file is modified by Solaris installation and de-installation scripts.