UNAME(3) Library Functions Manual UNAME(3)

unameget name of current system

#include <sys/utsname.h>

int uname(struct utsname *name);

The uname() function stores information identifying the current system in the structure pointed to by name .

The uname() function uses the structure defined in <sys/utsname.h>.

The uname() function returns a string naming the current system in the character array . Similarly, contains the name that the system is known by on a communications network. The arrays and further identify the operating system. The array contains a name that identifies the hardware that the system is running on.

The format of each member is implementation-dependent.

Upon successful completion, a non-negative value is returned. Otherwise, -1 is returned and errno is set to indicate the error.

No errors are defined.

None.

The inclusion of the nodename member in this structure does not imply that it is sufficient information for interfacing to communications networks.

None.

<sys/utsname.h> .

Derived from Issue 1 of the SVID.

February 1997 posix.fail