UNAME(S) UNIX System V UNAME(S)
Name
uname - get name of current UNIX system
Syntax
#include <sys/utsname.h>
int uname (name)
struct utsname *name;
Description
The uname system call stores information identifying the
current UNIX system in the structure pointed to by name.
The uname system call uses the structure defined in
<sys/utsname.h> whose members are:
char sysname[9];
char nodename[9];
char release[9];
char version[9];
char machine[9];
The uname system call returns a null-terminated character
string naming the current UNIX system in the character array
sysname. Similarly, nodename contains the name that the
system is known by on a communications network. release and
version further identify the operating system. machine
contains a standard name that identifies the hardware that
the UNIX system is running on.
[EFAULT] uname will fail if name points to an invalid
address.
See Also
uname(C)
Diagnostics
Upon successful completion, a non-negative value is
returned. Otherwise, a value of -1 is returned, and errno
is set to indicate the error.
Standards Conformance
uname is conformant with:
AT&T SVID Issue 2, Select Code 307-127;
The X/Open Portability Guide II of January 1987;
IEEE POSIX Std 1003.1-1988 with C Standard Language-
Dependent System Support;
and NIST FIPS 151-1.
(printed 6/20/89)