How to Change a Solaris Hostname

In the Solaris operating system (OS), a complex process is required to change an installed server’s hostname. To change a hostname in Solaris, these following files should be edited:

  • /etc/hosts
  • This will show an IP address for the hostname. Modify the hostname at this file location to the host’s new name.

  • /etc/nodename
  • This is similar to Linux’s /etc/HOSTNAME. Modify the hostname in this location.

  • /etc/hostname.hme0
  • ‘hme0’ is the name of the interface, which can be retrieved from the ‘ifconfig’ command. Modify the hostname here.

  • /etc/net/tic*/hosts
  • Change all information here to align with all the data in the files mentioned above.

  • /etc/resolv.conf
  • Specify the domain resolution and DNS server information in this file location.

  • /etc/defaultrouter
  • Input the IP address of the Solaris host’s default router here.

    After editing the data at these file locations, go to the command prompt and type the hostname. Reboot the server and test the changes to ensure proper operation.

    A Unix-based OS, Solaris was launched by Sun Microsystems in 1992 to succeed SunOS.

    The Solaris OS is popular due to its scalability (a network, process, or system’s capability to handle increasing amounts of work), specifically in Scalable Process Architecture (SPARC) systems. Solaris also sustains servers and workstations based on SPARC and x86 (the most commercially widespread instruction set architecture in personal computing), which are from SunOS and other system vendors. Efforts are underway to support various other platforms.

    Solaris is certified through the Single Unix Specification. Originally created as proprietary software, it is now supported by systems from major server vendors. Most of the codebase (all source code used in building a particular component or application) is currently open-source software from the OpenSolaris program.