1829750 Members
1419 Online
109992 Solutions
New Discussion

uname

 
Joel Tolentino
Occasional Contributor

uname

I'm running HPUX 11.0. When I type uname -a, it returns:
-t pds33 B.11.00 U 9000/785 2003051516 unlimited-user license

I don't think -t should be there. How do I change this. One of my applications runs a script which uses uname but gives me an error now.
3 REPLIES 3
Rajeev  Shukla
Honored Contributor

Re: uname

Use uname with -S option to change the uname to what you want to get displayed.

#uname -S rajeev

will set the uname to rajeev
Rajeev  Shukla
Honored Contributor

Re: uname

Also check your /etc/rc.config.d/netconf file to see you have the correct entry for HOSTNAME in that file.
Because uname -S will set the hostname until the server is rebooted. uname -S is run everytime the server is rebooted and is set to $HOSTNAME defined in /etc/rc.config.d/netconf configuration file.
Bill Hassell
Honored Contributor

Re: uname

This has been a common error in the past. As mentioned, the netconf file should have:

HOSTNAME=myname

where "myname" is the computer's 8 character hostname. The -t is probably an artifact of not having the variable HOSTNAME defined. Once HOSTNAME is set correctly, if -t still shows up, trace the script /sbin/init.d/hostname to see if there is a spelling error.


Bill Hassell, sysadmin