.TH UNAME 2 .UC 4 .SH NAME uname \- return system information. .SH SYNOPSIS .nf .B #include .B #include .B int uname(struct utsname *buf); .fi .SH DESCRIPTION .B uname() returns system information in .I buf. The .B utsname struct is as defined in /usr/include/sys/utsname.h : .br .nf struct utsname { .in 22 char sysname[9]; char nodename[MAXHOSTNAMELEN+1]; char release[9]; char version[9]; char machine[9]; }; .in 10 .fi .PP 0 is returned on success, a negative value on error. .SH ERRORS .B -ERROR is returned if .I buf is null. .SH FILES linux/kernel/sys.c .br /usr/include/linux/sys.h .br /usr/include/unistd.h .SH SEE ALSO sethostname(2) .SH BUGS release, version, machine, sysname, etc are hard coded into the .B utsname structure and should probably be constants in config.h.