hostname change on opensolaris

I’ve been asked this question a million times and there has been no real straight answer.. So I’ve decided to make a post on this for the benefit of everyone.
Frankly I am surprised that an OS that can do so many thing ,’so dam well’ with simple cmds is unable to change hostname cleanly.

Anyway this will do the trick for you..
Edit the following files and add the new name you want to in place of the existing ones.


Edit these 3 files and reboot to permanently change your hostname.

Some other methods include
$hostname <new-hostname>
(however this changes the hostname only for 1 logged in session.Although useful at times it will be a pain in the long run if you fail to remember that the change has to be done every time.)

(I’ve read and used this cmd to try and change.. but this cmd unconfigures the running machine entirely and a complete overhaul is required.. something that I would not recommend.)

Choose the first option and your good to go.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s