Operating System - HP-UX
1752770 Members
5668 Online
108789 Solutions
New Discussion юеВ

Re: How to rename a system's hostname

 
SOLVED
Go to solution
dictum9
Super Advisor

How to rename a system's hostname

I have done it before, but the command (which is shown during the install process) escapes me at the moment.

9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How to rename a system's hostname

You can do it manually but the easist approach is "set_parms hostname".
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: How to rename a system's hostname

Hi:

# /sbin/set_parms hostname

...triggers the menu-driven change. A reboot will be required.

Regards!

...JRF...
Coolmar
Esteemed Contributor

Re: How to rename a system's hostname

# hostname newname

That will change it for you. Remember to change it in the /etc/hosts and anywhere else it may be hardcoded.

S.
Coolmar
Esteemed Contributor

Re: How to rename a system's hostname

Sorry, forgot to mention that my suggestion will only change it until the next reboot....you will have to do what the gentlemen above suggested to change it permanently.
Ivan Krastev
Honored Contributor

Re: How to rename a system's hostname

Just use:

set_params hostname


regards,
ivan
dictum9
Super Advisor

Re: How to rename a system's hostname

Duh! *Slaps self on forehead* of course set_parms is what I was looking for.
Raj D.
Honored Contributor

Re: How to rename a system's hostname

Etc,
Also dont forget to verify that /etc/rc.config.d/netconf has been updated with HOSTNAME="new_hostname" .

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Sp4admin
Trusted Contributor

Re: How to rename a system's hostname

Hi Etc,

You just need to use "set_parms hostname" you can use "uname -S nodenmae" but this is just tempoary.

sp,
Bill Hassell
Honored Contributor

Re: How to rename a system's hostname

One other precaution: if you are using DNS, the nameserver will have to be updated at the time you change the hostname.


Bill Hassell, sysadmin