Get the Host ID Number on Solaris

On Solaris, the hostid is similar to the hostname. To determine the hostid of a Solaris box, there are a couple of options to follow.

sysdef -h

The sysdef utility gives you system information, including hardware and system information.

Example:

# sysdef -h
*
* Hostid
*
 3adf6e7c

hostid

The hostid utility is a shortcut command to quickly get the hostid.

Example:

# hostid
*
* Hostid
*
 3adf6e7c

Lowell Heddings is the founder and Editor-in-Chief of How-To Geek. He spends all his free time making sure this site can bring you fresh geekery on a daily basis, and has been doing so for over eleven years.