Changing the Hostname of a Solaris System

On Solaris 10 the value in the /etc/nodename file is sufficient for setting the hostname of the system.
The hostname of a solaris system needs a change in the following files. So replace the old hostname with the new one in these file. Do not try to comment out as this may lead to some boot time errors.

  • /etc/nodename
  • /etc/hosts
  • /etc/hostname.*
  • /etc/net/*/hosts
  • /etc/inet/ipnodes (Solaris 10 or later)

In order to change the hostname and nodename for the current session run:

uname -S new_hostname

Next change the savecore-dir (Solaris 7 or later)

dumpadm -s /var/crash/`uname -n`

Finally restart the syslog service to log messages using the new hostname.

Courtsey –

This entry was posted in Solaris/AIX/HP-UX and tagged . Bookmark the permalink.

Leave a Reply