[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 2

hostid Command

Purpose

Sets or displays the identifier of the current local host.

Syntax

/usr/sbin/hostid HexNumber InternetAddress | HostName ]

Description

The /usr/sbin/hostid command displays the identifier (either a unique host name or a numeric argument) of the current local host as a hexadecimal number. This numeric value is expected to be unique across all hosts and is commonly set to the address of the host specified by the InternetAddress or HostName parameter. The root user can set the hostid command by specifying a hexadecimal number for the HexNumber, InternetAddress, or HostName parameter. The host identifier is set to the hostname by the /etc/rc.net file.

Parameters

HexNumber Specifies a unique hexadecimal number representing the current local host.
InternetAddress Specifies an Internet address representing the current local host.
HostName Specifies a symbolic name that maps to a unique host.

Examples

  1. To set the identifier of the local host to the local Internet address with the hostid command, enter the command in the following format:
    hostid 192.9.200.3
    0xc009c803
    The hostid command converts the Internet address 192.9.200.3 into the hexadecimal representation 0xc009c803 , and then sets the local host (your workstation connected to a network) to this address.
  2. To display the identifier of the local host, enter:
    hostid
    0xc009c803
    The hostid command displays the identifier of the host as a hexadecimal number.

Related Information

The hostname command.

The gethostid subroutine, sethostid subroutine.

The rc.net file format.

TCP/IP Addressing in AIX Version 4.3 System Management Guide: Communications and Networks.


[ Previous | Next | Contents | Glossary | Home | Search ]