Change System's Hostname in AIX

Technote (FAQ)


Question
Change System's Hostname in AIX
Answer
This document lists instructions for changing the hostname of a system in AIX. It pertains to AIX versions 5L.

1.     Permanently change hostname for inet0 device in the ODM by choosing one of the following:

Command line method:
     # chdev -l inet0 -a hostname=<newhostname>

SMIT method:
   
         # smitty hostname (fastpath)

2.     Change the name of the node which changes the uname process by choosing one of the following:
Command line method:

    # uname -S <newhostname>

or run the following script:

   # /etc/rc.net
3.     Change the hostname on the current running system. Enter:
     # hostname <newhostname>

4.     Change the /etc/hosts file to reflect the new hostname.

5.     Change DNS name server, if applicable.