Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
uname - get basic data on current operating system
&pagelevel(4)&pagelevel
Syntax | #include <sys/utsname.h> int uname(struct utsname *name); |
Description uname()
obtains basic information on the current operating system and stores it in the
| structure pointed to by name. uname() uses the utsname structure defined in sys/utsname.h . The members of the structure are the char arrays sysname , nodename , release , version and machine . The name of the current operating system is entered in the array sysname. Similarly, nodename contains the name that the system is known by on a communications network. The arrays
release and version contain the release number and release date of the operating system, and the array machine contains a name that identifies the hardware on which the system is running. |
Return val. | Non-negative value |
| if successful. |
-1 | if an error occurs. errno is set to indicate the error. |
Errors | uname() will fail if: Extension
EFAULT name is an invalid address. (End) |
Notes | The inclusion of the nodename member in this structure does not mean that this information is sufficient for addressing communications networks. |
See also | sys/utsname.h . |