Pages

Thursday, December 16, 2010

How to change hostname

You can use below tips to change hostname. You just need to change 4 files to make the change persistent across reboot. There are /etc/nodename, /etc/hostname.<interface>, /etc/inet/hosts, and /etc/inet/nodename. Interface used in this example is Intel PRO/1000 Gigabit family device driver (e1000g).

  1. Modify /etc/nodename to include your new hostname. The new hostname used is solaris-sunray.
    bash # vi /etc/nodename
    solaris-sunray
  2. Modify /etc/hostname.e1000g0 and insert new hostname.
     ...
        solaris-sunray
  1. Modify /etc/inet/hosts and /etc/inet/ipnodes and insert new hostname
    ...
    172.16.31.242 solaris-sunray
  2. Modify /etc/inet/hosts and /etc/inet/ipnodes ard insert new hostname
    ...
    172.16.31.242 solaris-sunray
  3. Set the new hostname in running host
    bash # hostname solaris-sunray

No comments:

Post a Comment