Skip to content

Instantly share code, notes, and snippets.

@wesleymesquita
Created March 14, 2021 15:31
Show Gist options
  • Save wesleymesquita/bdbfc2c9f24c33a0ccf05867eac9eae8 to your computer and use it in GitHub Desktop.
Save wesleymesquita/bdbfc2c9f24c33a0ccf05867eac9eae8 to your computer and use it in GitHub Desktop.
#include <sys/utsname.h>
#include <stdio.h>
/**
uname implementation
*/
int main(){
struct utsname name;
uname(&name);
printf("%s %s %s %s %s\n", name.sysname, name.nodename, name.release, name.version, name.machine);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment