How to change hostname in Solaris 10,RedHat and HP-UX 11.31

Below short post how to change hostname in Solaris 10, RedHat and HP-UX 11.31 :

1. Solaris 10

We need to modify hostname in following files:

/etc/hosts

/etc/inet/ipnodes

/etc/hostname.<interface>
/etc/nodename

and rename directory under /var/crash

cd /var/crash
mv oldname newname

Then reboot server.

2. RedHat

Changes should be made to :

/etc/hosts
/etc/sysconfig/network

Then apply command:

hostname <hostname>

and restart network services:

service network restart


3. HP-UX

Edit field HOSTNAME in

/sbin/rc.config.d/netconf

Then apply changes manually:

uname -S <hostanme>  – for UUCP service

hostname <hostname> – for Internet host names (TCP/IP)

or using script :

/sbin/init.d/hostname start

Leave a Response