if you want to change the hostid of a Linux machine then do the following-
1. If there exists a file /etc/hostid , , then go to step 3.
2. If the file dose not exist then create a text file /etc/hostid by following command-
#cd /etc
#gedit (a text editor will open )
now save this file with name hostid id under /etc. OR use any other method to create the /etc/hostid file.
3. Now let you want the hostid should be 12345678, then type the following command in terminal
# sudo su echo \\78\\56\\34\\12 >/etc/hostid.
to check the hostid type the following command in terminal .
1. If there exists a file /etc/hostid , , then go to step 3.
2. If the file dose not exist then create a text file /etc/hostid by following command-
#cd /etc
#gedit (a text editor will open )
now save this file with name hostid id under /etc. OR use any other method to create the /etc/hostid file.
3. Now let you want the hostid should be 12345678, then type the following command in terminal
# sudo su echo \\78\\56\\34\\12 >/etc/hostid.
to check the hostid type the following command in terminal .
hostid
It will give value of hostid : 12345678.
It will give value of hostid : 12345678.