Operating System - HP-UX
1748134 Members
3571 Online
108758 Solutions
New Discussion

Re: uname -a and hostname

 
UnixT
Frequent Advisor

uname -a and hostname

Hi,

I want to change my systems name as same on both uname -a and hostname.

Now its shows as different.
/etc/rc.config.d/netconf have the same name in hostname.

Pls help
9 REPLIES 9
Jeeshan
Honored Contributor

Re: uname -a and hostname

use command set_parms

#man set_parms

#set_parms hostname
a warrior never quits
Kranti Mahmud
Honored Contributor

Re: uname -a and hostname

Hi UnixT,

To change the hostname check the below link:

http://sysdigg.blogspot.com/2008/03/how-to-change-hostname-on-hp-ux-11i.html

To change the uname -a check the below link:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1303751

Rgds-Kranti
Dont look BACK as U will miss something INFRONT!
Kranti Mahmud
Honored Contributor

Re: uname -a and hostname

Hi UnixT,

Check the following thread also:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1263707504886+28353475&threadId=1282764

Rgds-Kranti
Dont look BACK as U will miss something INFRONT!
Khalid Shakoor
Regular Advisor

Re: uname -a and hostname

Hi,

#set_parms hostname

Khalid
Nafez ALNajjar
Frequent Advisor

Re: uname -a and hostname

Hi,

Set and view the TCP/IP hostname
# hostname
# hostname

Set and view the UUCP hostname
# uname â S
# uname -n

Good Luck,
Nafez ALNajjar
Nafez ALNajjar
Frequent Advisor

Re: uname -a and hostname

retyping . . .

#hostname -S

Nafez ALNajjar
ManojK_1
Valued Contributor

Re: uname -a and hostname

Hi,

What is the output of "uname -n" and "hostname".
What is the OS Version?

If the the hostname you specified in /etc/rc.config.d/netconf is more than 8 characters then surely the "uname -n" and "hostname" will be different if the OS Version is not HP Unix 11.31 and the long hostname is not enabled.

you can use "set_parms hostname" command to reset the hostname. But it will be active only after rebooting the Server.

or

Edit the /etc/rc.config.d/netconf file, change the hostname and run the following commands.

/sbin/init.d/net stop
/sbin/init.d/net start

Do a fresh login and verify.

Manoj K
Thanks and Regards,
Manoj K
shanmuhanandam
HPE Pro

Re: uname -a and hostname

Hi,
change the host name in the /etc/hosts file and the /etc/rc.config.d/netconf file.

then do the following
#/sbin/init.d/hostname start
#/sbin/init.d/net stop
/sbin/init.d/net start

Regards,
Shanmugam.
I am an HPE Employee

Accept or Kudo

AVV
Super Advisor

Re: uname -a and hostname

Hi,

Please try it with

set_parms hostname

and give your desired hostname.

Also check the entry in /etc/rc.config.d/netconf - as what the hostname specified there. uname -a only will show you the first 8 chara of the name specified in netconf file.

Thanks