Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to permanently change the hostname on a Solaris box. How do I do that?

share|improve this question
up vote 19 down vote accepted

Assuming that you have allowed the operating system to configure the primary interface for you, there are three (3) files you must change:


<interface> will be the primary ethernet interface for the system. Some examples (depending on your architecture) will be bge0, hme0, e1000g0, eri0, qfe0. Here's an ad-free answer for future reference.

Also change the savecore directory to reflect the new hostname in /etc/dumpadm.conf, and you may also need to edit /etc/inet/ipnodes, depending on the exact version of Solaris.

share|improve this answer
It's important to mention here, as per RealAdmin's answer that the savecore directory /var/crash/<hostname> and dumpadm configuration should be changed too when changing the hostname. – Shaun Dewberry Mar 13 '12 at 10:11

They don't make it easy, do they?

Answer here:

share|improve this answer
Thanks! I actually got to that page from Google, but my eyes totally missed the answer due to the rampant ads. – Mike Ottum Jun 5 '09 at 0:36

The supported way of doing this is to run the sys-unconfig command, then reconfigure the host with the desired name.

share|improve this answer

sys-unconfig may be the supported way of doing this, but it completely hoses the entire configuration of the machine and you have to re-configure a reboot (from the LOM or system controller). What a pain.

also issue the command hostname new_hostname and a reboot is not required. You must also rename the /var/cras/hostname file and update the /etc/dumpadm.conf file and change the hostname.

share|improve this answer

to piggyback off gary chambers--here's a more authoritative source! His answer is correct though, I give him all the credit for that, but I take a Reaganistic approach to external verify!

section 5.1: Modifying the IPv4 Address and Other Network Parameters to Persist Across Reboots

taken from: System Administration Guide: IP Services > Part II TCP/IP Administration > Chapter 5 Configuring TCP/IP Network Services and IPv4 Addressing (Tasks) > Configuring Systems on the Local Network > How to Change the IPv4 Address and Other Network Configuration Parameters

Also in versions earlier than 11/06, do the following:

# vi /etc/inet/ipnodes

<IPoflocalhost> <updatedhostname>

share|improve this answer

uname -S <new-hostname>
to change the hostname of a running system. Beware that the change will be lost upon reboot. To make them permanent, modify the files indicated by Gary Chambers.

share|improve this answer
#ifconfig -a

lo:  e1000g0 : <----- Ur interface Name

#vi /etc/hostname.<interface> hostname hostname

save and exit

#svcadm restart network
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.