Changing hostname in Solaris 10
Print This Post
Email This Post
I’ve been using Linux for sometime now and changing hostname in Linux has always been a simple matter of changing the /etc/hostname file or running the ‘hostname” command. Changing hostname is Solaris 10 however is a little more cumbersome than that.

The files that you need to change to change the hostname are:
- /etc/hostname.<interface>
- /etc/nodename
- /etc/hosts
- /etc/inet/ipnodes
The /etc/host file that contain the ip address and all the hostname that is resolved to that specific ip adress. Find the interface’s ip address and change the old hostname to the new one.
All the other file contain just the hostname, so change the content of the files to match the new hostname. If you have multiple network interfaces, then you will have, for example, /etc/hostname.eth0, /etc/hostname.eth1 and so on.
If you are not planning to restart the machine, then you need to run the ‘hostname <new hostname>’ command and also rename “/var/crash/<oldhostname>” to “/var/crash/<newhostname>”. But if you are planinng to restart anyway then the system will create the /var/crash/hostname and use the new hostname on startup.
edit:(22/2/08) After some more testing, it seems that some application are a little more finicky about hostname changes than others. So I would suggest you to rename the “/var/crash/<oldhostname>” and run the “hostname” command directory regardless weather you will restart the machine or not.I had trouble with certain configurations of kerberos if those steps are not done even if I restarted the machine.
Hope you like your new hostname. ![]()
| 2.5 |





Changing hostname in Solaris 10 « Monster Servant
Simple post on how to change the hostname on a solaris 10 machine. Solaris 10 have some quirks that can cause headache to users that are used to using linux.
28 March 2008 at 5:59 pm