NAME
uname — get name
of current system
SYNOPSIS
#include <sys/utsname.h> int uname(struct utsname *name);
DESCRIPTION
The uname() function stores information identifying the current system in the structure pointed to by name .
The uname() function uses the utsname structure defined in <sys/utsname.h>.
The uname() function returns a string naming the current system in the character array sysname. Similarly, nodename contains the name that the system is known by on a communications network. The arrays release and version further identify the operating system. The array machine contains a name that identifies the hardware that the system is running on.
The format of each member is implementation-dependent.
RETURN VALUE
Upon successful completion, a non-negative value is returned. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
No errors are defined.
EXAMPLES
None.
APPLICATION USAGE
The inclusion of the nodename member in this structure does not imply that it is sufficient information for interfacing to communications networks.
FUTURE DIRECTIONS
None.
SEE ALSO
DERIVATION
Derived from Issue 1 of the SVID.