Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Help] About the Linux hostid

Status
Not open for further replies.

jizhongren

Junior Member level 3
Junior Member level 3
Joined
Feb 18, 2004
Messages
27
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
227
I have install the red hat 7.2 in pc.
I want to change the hostid.Can you help me!!!
Thanks!!
 

The hostid in Linux is the eternet address.
You can use ifconfig change it. But if you restart,
you must setup it again. Or you can add the command in the rc2.d. Enjoy it!
 

nope.... the hostid is not equal to ethernet address!

you can get hostid of your Linux box with this command:
/usr/bin/hostid

The hostid returned from the command looks like that:

a8c05b8d

you can get hostid when you're root or standart user, but only root can change it!!!

you can get your ethernet MAC address with ifconfig...

/sbin/ifconfig eth0

The HW address returned from the command looks like that:

00:07:E9:5F:C2:20

You can see how to calculate hostid, where it is stored, when you change it in the source of hostid. There you can see how it is calculated in the case if you have not NIC in your Linux box...
 

jizhongren said:
I have install the red hat 7.2 in pc.
I want to change the hostid.Can you help me!!!
Thanks!!

please use uname, read man of it
this command can display hostid

rgs
 

test this command: uname -a
 

uname -a gives me this:


Linux zerotonine 2.4.26 #8 Wed Apr 14 16:35:31 PDT 2004 i686 unknown unknown GNU/Linux
 

# uname --help

Usage: uname [OPTION]...
Print certain system information. With no OPTION, same as -s.

-a, --all print all information, in the following order:
-s, --kernel-name print the kernel name
-n, --nodename print the network node hostname
-r, --kernel-release print the kernel release
-v, --kernel-version print the kernel version
-m, --machine print the machine hardware name
-p, --processor print the processor type
-i, --hardware-platform print the hardware platform
-o, --operating-system print the operating system
--help display this help and exit
--version output version information and exit

Report bugs to <bug-coreutils@gnu.org>.

see that uname doesn't have anything about hostid!!!
 

Its all in the Web ...

(**broken link removed**)

says:

'hostid'

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 bytes transposed.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top