Network Server SolarisThe hostname of a system is the name that identifies a device in a network, it is used to make humans life easier because it is easier to work with names than numbers. In a previous post i described how to modify the IP of a Solaris Server permanently, now i would like to write about the Systems Hostname.

The hostname in Sun Solaris is in three files:

/etc/inet/hosts

/etc/hostname.xxn

/etc/nodename

1) Edit the /etc/nodename to modify the canonical name (the name that identifies a system when a service is required).

2) Edit the file /etc/hostname.xxn. This file contains either the IP address of the refered interface (by xxn) or the hostname, a system can have multiple names, one for every interface.

3) Modify /etc/inet/hosts. The format of the /etc/inet/hosts file is this:

<IPAddress> <hostname> <nickname>

For example:

10.10.10.20 www.serversolaris.com

Tips:

* After modifying this files you have to reboot.

* If you have the crash dump enabled, dont forget to modify the system name also in /var/crash.

* If you use DHCP to assign hostnames, /etc/nodename is not used.