Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a Windows equivalent to the unix hostid?

share|improve this question
Since hostid doesn't do anything useful these days, could you describe what exactly are you trying to get? An unique machine identifier? – grawity Jun 23 '11 at 22:22

Not really, at least not exactly. HostID was usually a way to lock a piece of software to a node. Even in the later days of Solaris you could easily change the HostID, making it less locked to hardware.

You could use the network MAC, which should be globally unique. But these are easily cloned

You can also try the CPUID

There have been similar questions answered on stackoverflow

share|improve this answer
These days in Linux/glibc the hostid is just read from /etc/hostid if exists. – grawity Jun 23 '11 at 22:26

The registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography has a value MachineGuid containing a randomly-generated GUID. This is static, but easily changeable.

share|improve this answer

You can install cygwin which comes with the hostid command.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.