RSS Feed

How to Change a Hostname on Solaris

Solaris makes it unreasonably difficult to change an installed server’s hostname.

To change the hostname on a Solaris system, edit all of these files:

  • /etc/hosts
  • /etc/nodename
  • /etc/hostname.*
  • /etc/inet/ipnodes

When file editing is complete, reboot the server to test the changes and ensure that they operate correctly.

change a hostname on solaris How to Change a Hostname on SolarisNote that changing the hostname only changes the name by which the machine refers to itself. This does not change the DNS name or names of the host.

Respond to “How to Change a Hostname on Solaris”
  1. Amanda says:

    In Solaris 10 (and maybe older ones, not sure how far back this goes), I found that

    # /etc/net/ticlts/hosts
    # /etc/net/ticots/hosts
    # /etc/net/ticotsord/hosts

    are not necessary to edit. When you enter the file it says these are no longer consulted and will be removed from future versions. The others should suffice.

    • memenode says:

      Thanks Amanda, I edited those out. Good to hear it’s improving, but that still leaves quite a few files to edit. In Linux I think it’s just one file.

  2. On Solaris 11, /etc/inet/ipnodes is the same as /etc/hosts.  Getting better all the time…

  3. Augie says:

    Hi
    On  Solaris 10 , i would like to create  a User and the Home directory is /TEST
    whenever i use the Command to create a user with the command
    useradd <name>
    the Home directory is  /export/home
    i need a command so the default home directory of the User goes to /TEST
     
    Thanks in Advance

  4. Augie says:

    Hi
    Finally i got the  answer  for the default home directory
    vi /usr/sadm/defadduser

Leave a Reply

Post your comments and questions below, but please follow our commenting guidelines.


Path: Home > Unix > How to Change a Hostname on Solaris