How to change the hostname in Solaris 10

To change the hostname in Solaris 10 you need to edit 3 files and appply the new name.
/etc/nodename
/etc/hostname.*interface, e.g. hostname.bge0

/etc/inet/hosts this file is a hard link to /etc/inet/ipnodes. You will need to make /etc/inet/ipnodes writable before editing it. To enable write use the command chmod 744 /etc/inet/ipnodes.

Finally rename directory /var/crash, the system will automatically recreate this after rebooting.
# cd /var
# mv crash crash.old

Now reboot the server.

About Andrew Lin

Hi, I have always wanted to creat a blog site but never had the time. I have been working in Information Technology for over 15 years. I specialize mainly in networks and server technologies and dabble a little with the programming aspects. Andrew Lin

View all posts by Andrew Lin →