uname -S newhostname

hi freinds recently i have change hostname node as using uname -s ******* but next time i saw the name using uname -n the name did t changed is that i have to reboot the system

I think you need to use "uname -S newhostname", that is using an upper case S.

If this is a Solaris 10 machine then check /etc/inet/ipnodes (usually replaced by a link to /etc/inet/hosts on later versions of Soklais 10).

no tony i gave uname -S ********* after cmd xcecution its shows only after putting this cmd uname -n but not in the #prmpt ie. sen***#

As an AIX admin you'd change hostname with

# hostname <whatever>

and uname with

# uname -S <whatever>

These are different things.

If you want to see the hostname in the shell prompt you'd probably assign hostname -s to a variable in .profile and use it to adapt PS1. Sample:

export NODE=`hostname -s`

export PS1='($?)$NODE:$PWD > '

You could do sth. similar with uname -s of course.

If this is an AIX box, you want the hostname saved into your ODM. Use the "smitty hostname" to set it. Then it will survive the reboot.