#include <stdio.h>
#include <stdlib.h>
#include <sys/utsname.h>
int main()
{
struct utsname *name;
name = (struct utsname *)malloc(sizeof(struct utsname));
if (uname(name) == -1)
{
printf("uname error!/n");
exit(-1);
}
printf("%s %s %s %s %s/n",name->sysname,name->nodename,
name->release,name->version,name->machine);
free(name);
return 0;
}