DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

uname(2)


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)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004