> > reformatting the drive changed the hostid to 7f0100.
> > Is there anyway I can change the hostid in 7.2?
You mean Red Hat 7.2 (I'm guessing). Linux is only up to version 2.6.x
these days. Version 7 is a ways off still ;-).
> Sure, why not. Assuming you mean the hostname that is :
>> Edit /etc/sysconfig/network
> Change the hostname in there
Not quite my friend. hostname != hostid. However, as tonight is the
first time I've heard of hostid and it's man page is rather sparse I
did a little google:
Echo a 32-bit hexadecimal numerical identifier for the host machine.
This command allegedly fetches a "unique" serial number for a
particular system. Certain product registration procedures use this
number to brand a particular user license. Unfortunately, hostid only
returns the machine network address in hexadecimal, with pairs of
The network address of a typical non-networked Linux machine, is
found in /etc/hosts.
bash$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
As it happens, transposing the bytes of 127.0.0.1, we get
0.127.1.0, which translates in hex to 007f0100, the exact equivalent
of what hostid returns, above. There exist only a few million other
Linux machines with this identical hostid.
>> In addition, you should change the name in /etc/hosts
So yes, this is the part you need to edit. The example above from the
we is a little misleading though, becasue you only get 7f0100 if the
hostname name is mapped to 127.0.0.1 in /etc/hosts (where they just
On this laptop:
grep ziggy /etc/hosts
But if I make a change so..
# grep ziggy /etc/hosts
127.0.0.1 localhost.localdomain localhost ziggy
(No rebooting need. Conor, dude, you should know better than that. You
never have to reboot) ;-)
> Dead easy my friend, dead easy.
With google it is!
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!