1 2 3 4 5 6
#include <unistd.h> #include <stdio.h> int main(void) { printf("hostid=%d\n", gethostid()); return 0; }