February 13, 2021 in Tutorial2 minutes
In this tutorial we learn how to use hostid command in Linux. hostid command print the numeric identifier for the current host.
hostid [OPTION]Since there are no options or parameters to be passed to the hostid command, to use hostid, we can just run the command hostid.
hostid
007f0101It will give us nothing. If we check the exit status of the command we just run, it will give us exit status 1 which is a general exit status.
$ echo $?
1We can use man and info command to see the manual page of hostid command.
hostid command also have --help option to show list of options.
To open man page for hostid command we can use command below. To exit man or info page you can press q.
man hostidTo open info page for hostid command we can use command below.
info hostidTo open help page from hostid command we can run command below.
hostid --helpYou can find hostid command source code from the folowing repositories:
You can read tutorials of related Linux commands below:
In this tutorial we learn how to use hostid in Linux with practical examples. Visit our Linux Commands guide to learn more about using command line interface in Linux.