program to view uname fields
This commit is contained in:
parent
6876eeabd3
commit
88a67ff368
|
@ -0,0 +1,15 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
struct utsname name;
|
||||||
|
uname(&name);
|
||||||
|
|
||||||
|
printf("sysname....%s\n", name.sysname);
|
||||||
|
printf("nodename...%s\n", name.nodename);
|
||||||
|
printf("release....%s\n", name.release);
|
||||||
|
printf("version....%s\n", name.version);
|
||||||
|
printf("machine....%s\n", name.machine);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue