Equivalent of 'hostname' on HP/UX?

Equivalent of 'hostname' on HP/UX?

Post by Will Est » Tue, 09 Feb 1993 05:28:48



Sorry to bother people with such a basic question, but I am telnetting
to an HP/UX host and am without manuals.  Two questions around the
hostname command:

1)      Does HP/UX have a command that will return the name of the
local host?

2)      Is there some portable construct to determine a local host
name?  If not, then does someone have a script they could share that
is "guaranteed" to return the local hostname by determining which
system is being used and then executing the appropriate command for
that system?

--

 
 
 

Equivalent of 'hostname' on HP/UX?

Post by John Ellithor » Tue, 09 Feb 1993 02:18:54



Quote:> NNTP-Posting-Host: smurf.sti.com
> Sorry to bother people with such a basic question, but I am telnetting
> to an HP/UX host and am without manuals.  Two questions around the
> hostname command:
> 1) Does HP/UX have a command that will return the name of the
> local host?

I tried 'hostname' on an HP Series 700 and it worked:

dopey% hostname
dopey

You must have an older version of HP-UX.

John
--

===============================================================================

Dept. of Physics, Rm 26-349               | Phone   : (617) 253-3074  Office
Massachusetts Institute of Technology     |           (617) 253-3072  Lab
Cambridge, MA  02139                      |           (617) 236-4910  Home
===============================================================================

 
 
 

Equivalent of 'hostname' on HP/UX?

Post by Stefan Skoglu » Tue, 09 Feb 1993 20:23:42


   1)   Does HP/UX have a command that will return the name of the
   local host?

Try hostname or uname -n

They work at least at my machine an elderly 9000/840 with HP-UX 7.xx.

-----------------------------------------------------------------------
Stefan Skoglund                              I Home : 0500 450878

University of Skoevde, Sweden                I        +46 500 450878 Int

 
 
 

Equivalent of 'hostname' on HP/UX?

Post by Robert A. Schul » Sun, 14 Feb 1993 08:13:11



: > NNTP-Posting-Host: smurf.sti.com

: > Sorry to bother people with such a basic question, but I am telnetting
: > to an HP/UX host and am without manuals.  Two questions around the
: > hostname command:

: > 1)       Does HP/UX have a command that will return the name of the
: > local host?

: I tried 'hostname' on an HP Series 700 and it worked:

: dopey% hostname
: dopey

My system at B.08.00 supports hostname.  But you might try "/bin/uname -n"
--
Rob Schultz                   | If you think my opinions reflect those
Boeing Computer Services      | of The Boeing Company then you have not

 
 
 

Equivalent of 'hostname' on HP/UX?

Post by Phil Bro » Thu, 18 Feb 1993 22:49:17





>: > NNTP-Posting-Host: smurf.sti.com

>: > Sorry to bother people with such a basic question, but I am telnetting
>: > to an HP/UX host and am without manuals.  Two questions around the
>: > hostname command:

>: > 1)   Does HP/UX have a command that will return the name of the
>: > local host?

>: I tried 'hostname' on an HP Series 700 and it worked:

>: dopey% hostname
>: dopey

>My system at B.08.00 supports hostname.  But you might try "/bin/uname -n"

Another alternative is /bin/nodename, which gives the internet style address
of the machine.

machine.mitre.org      as an example

        Phil

 
 
 

Equivalent of 'hostname' on HP/UX?

Post by Chuck Mun » Fri, 19 Feb 1993 05:36:39


Quote:

> Another alternative is /bin/nodename, which gives the internet style address
> of the machine.

> machine.mitre.org      as an example

----------

A word of caution ....  the  /bin/nodename  command is part of an old,
HP-proprietary NS package.  The string it gives back is not derived
from any entries in  /etc/hosts  or from any BIND server.  This string
is entered into the networking tables for NS at boot time.

The preferred method would be either the hostname or uname command.

Chuck.

+-------------------------------------------+
| The above is a personal statement, not an |
| official statement of Hewlett-Packard.    |
+------------------------------- ve1ajz ----+