1847986 Members
6985 Online
104022 Solutions
New Discussion

Re: renaming hostname

 
Jeff Hagstrom
Regular Advisor

renaming hostname

How can I change the hostname?
5 REPLIES 5
Rita C Workman
Honored Contributor

Re: renaming hostname

I would recommend doing this via the set_parms
command...

/rcw
Patrick Wallek
Honored Contributor

Re: renaming hostname

I agree with Rita, 'set_parms hostname' will do what you require.

Here is an excerpt from the set_parms man page:

hostname

Sets the system hostname. Validates a user supplied hostname according to host naming conventions and sets various system initialization variables to operate with that hostname. Particularly, it edits /etc/hosts to associate the new hostname with the current IP address of the system, if that can be determined. First boot :
Also allows the user to specify a DHCP server to get hostname and networking information from, then confirms the information.

WARNING: set_parms does not know about optionally installed software when changing the hostname. If such software remembers the previous hostname, then it may not work properly after the hostname is changed.

A mechanism is provided that helps generalize the hostname changing function. set_parms will call, in ls(1) sorted order, any executable programs installed in the directory /sbin/ch_hostname.d. This occurs in
first boot or non-first boot calls. HP may in the future supply special programs in this location. The system administrator may also supply custom programs for site installations using, for example, Ignite-UX.

The system must be rebooted after the hostname is changed for it to take full effect.

**************************

If you want to do it manually, then you can edit the /etc/rc.config.d/netconf file and /etc/hosts file. This does not take into account dependencies on other systems files like .rhosts, hosts.equiv, .netrc files, etc.

federico_3
Honored Contributor

Re: renaming hostname

I'll do like this:
#/sbin/set_parms hostname


Federico
Ravi_8
Honored Contributor

Re: renaming hostname

#set_parms hostname
never give up
Vincenzo Restuccia
Honored Contributor

Re: renaming hostname

#hostname new_name