uname(2) uname(2)
NAME
uname - get name of current UNIX system
SYNOPSIS
#include <sys/utsname.h>
int uname(struct utsname *name);
DESCRIPTION
uname stores information identifying the current UNIX system
in the structure pointed to by name.
uname uses the structure utsname defined in sys/utsname.h
whose members are:
char sysname[SYS_NMLN];
char nodename[SYS_NMLN];
char release[SYS_NMLN];
char version[SYS_NMLN];
char machine[SYS_NMLN];
uname 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.
Files
Message catalog: uxcore.abi
Return Values
On success, uname returns a non-negative value. On failure,
uname returns -1 and sets errno to identify the error.
Errors
In the following conditions,uname fails and sets errno to:
EFAULT name points to an invalid address.
REFERENCES
uname(1)
Copyright 1994 Novell, Inc. Page 1