1UNAME(3) Library Functions Manual UNAME(3)
2
3
4
6 uname - get system identification
7
9 #include <sys/utsname.h>
10
11 int
12 uname(name)
13 struct utsname *name
14
16 The uname function stores nul-terminated strings of information identi‐
17 fying the current system into the structure referenced by name.
18
19 The utsname structure is defined in the <sys/utsname.h> header file,
20 and contains the following members:
21
22 sysname Name of the operating system implementation.
23
24 nodename Network name of this machine.
25
26 release Release level of the operating system.
27
28 version Version level of the operating system.
29
30 machine Machine hardware platform.
31
33 If uname is successful, 0 is returned, otherwise, -1 is returned and
34 errno is set appropriately.
35
37 The uname function may fail and set errno for any of the errors speci‐
38 fied for the library functions sysctl(3).
39
41 uname(1), sysctl(3)
42
44 The uname function conforms to IEEE Std1003.1-88 (``POSIX'').
45
47 The uname function first appeared in 4.4BSD.
48
49
50
514th Berkeley Distribution February 4, 1995 UNAME(3)