Operating System - HP-UX
1751843 Members
5890 Online
108782 Solutions
New Discussion юеВ

change the hostname online with out reboot

 
SOLVED
Go to solution
Sivakumar TS
Honored Contributor

change the hostname online with out reboot

Hi Gurus,

Is it possible to change the hostname online with out reboot in HPUX ? If so what is the procedure ?

With Regards,

Siva.
Nothing is Impossible !
10 REPLIES 10
Arunvijai_4
Honored Contributor

Re: change the hostname online with out reboot

You can do it by # hostname
Look at # man hostname for more details.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Senthil Prabu.S_1
Trusted Contributor

Re: change the hostname online with out reboot

Hi,
hostname can help u.
But next reboot will not have the new hostname.


It is better to use /sbin/set_parms to change system setting. set_parms will ask you whether you want to reboot the system; this is necessary in order to apply the configuration changes. You can answer "Yes, Reboot", or you can answer "No, Do Not Reboot" and reboot at a later time.
One man's "magic" is another man's engineering. "Supernatural" is a null word.
Sivakumar TS
Honored Contributor

Re: change the hostname online with out reboot

Hi Thanks for the info,

AS i summarise:

Changing the hostname using #hostname is dynamic but wont be in effect after next reboot.

set_params will be in effect only after next reboot.

Is there any way to change it dynamically as well to retain after newx reboot , by manually editing some files-like that ?

With Regards,

Siva.
Nothing is Impossible !
Pete Randall
Outstanding Contributor

Re: change the hostname online with out reboot

Actually, /sbin/set_parms will change the hostname dynamically. The program suggests that you reboot, but you do not have to.


Pete

Pete
Senthil Prabu.S_1
Trusted Contributor

Re: change the hostname online with out reboot

Hi,
I believe /sbin/set_parms is the only possible way to do it. This never compel You to reboot. It is upto U to reboot now or latter.
One man's "magic" is another man's engineering. "Supernatural" is a null word.
Muthukumar_5
Honored Contributor
Solution

Re: change the hostname online with out reboot

Yes.

Steps:

1) hostname
2) uname -S
3) Update HOSTNAME entry in /etc/rc.config.d/netconf file.

It will work.

hth.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: change the hostname online with out reboot

Same problem too.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=981064

-Muthu
Easy to suggest when don't know about the problem!
Sivakumar TS
Honored Contributor

Re: change the hostname online with out reboot

When I do set_params hostname and change the hostname, it is not getting into effect immediately ( still the old hostname continues ) only after the reboot it gets into effect.
Nothing is Impossible !
Muthukumar_5
Honored Contributor

Re: change the hostname online with out reboot

Did you follow my steps? It will make temporary and permanent setting changes too.

-Muthu
Easy to suggest when don't know about the problem!