UNAME(2P) — UNIX Programmer’s Manual
NAME
uname − (POSIX only)get system name
SYNOPSIS
#include <sys/utsname.h>
int uname(struct utsname ∗name);
DESCRIPTION
The information in this specification applies only to POSIX applications.
Uname stores information identifying the current operating system in the structure pointed to by name.
The structure utsname is defined in the header <sys/utsname.h> and contains the following members:
charsysname[32]
charnodename[32]
char release[32]
char version[32]
charmachine[32]
Sysname is set to the value “NEXTSTEP”. Nodename is the hostname set by hostname(1) or sethostname(2). Release and version reflects the level of the operating system. Machine identifies the hardware architecture.
RETURN VALUE
If successful uname returns a nonnegative value. If the request failed, −1 is returned.
SEE ALSO
4th Berkeley Distribution — August 1, 1992