File: uname.2

package info (click to toggle)
manpages-ja 0.4.0.0.20020315-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,808 kB
  • ctags: 4
  • sloc: sh: 9,595; perl: 157; makefile: 62
file content (139 lines) | stat: -rw-r--r-- 4,216 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
.\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\" 
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
.\"         all rights reserved.
.\" Translated Thu Jun 26 21:23:19 JST 1997
.\"         by SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
.\" Updated & Modified Thu Feb 14 21:53:41 JST 2002
.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
.\"
.TH UNAME 2 2001-12-15 "Linux 2.5.0" "Linux Programmer's Manual"
.SH ̾
uname \- ߲ƯΥͥˤĤƤ̾Ⱦ
.SH 
.B #include <sys/utsname.h>
.sp
.BI "int uname(struct utsname *" buf );
.SH 
.B uname

.IR buf
ǻؤ빽¤Τ˥ƥ֤
.I utsname 
¤Τ
.IR <sys/utsname.h> 
ǰʲΤ褦Ƥ롣
.RS
.nf
struct utsname {
.in +8
char sysname[];
char nodename[];
char release[];
char version[];
char machine[];
.in -8
#ifdef _GNU_SOURCE
.in +8
char domainname[];
.in -8
#endif
};
.fi
.RE
.I struct utsname
ˤĹϻꤵƤʤ
եɤϥ̥ʸ (\\0) ǽü롣
.SH ֤
 0 ֤롣Ԥ \-1 ֤ꡢ
.I errno
顼Ƥ˽äꤵ롣
.SH 顼
.TP
.B EFAULT
.I buf
ͭǤʤ
.SH 
SVr4, SVID, POSIX, X/OPEN.
BSD 4.3 ˤ
.B uname
뤬ʤ
.PP
.I domainname
С (NIS ޤ YP ɥᥤ̾)  GNU γĥǤ롣
.SH 
ϥƥॳǤꡢOS ̾꡼Сʤɤ
֤ʬäƤ
ˤ줬ƯƤϡɥʬäƤ
äƹ¤Τ 4 ĤΥեɤˤϰ̣롣
\fInodename\fP եɤˤϰ̣ʤ:
ΥեɤϸߤΥޥ (Ƥʤ)
ɤΥͥåȥˤ̾Ϳ뤬
̾ޥʣΥͥåȥ°ʣ̾ġ
ˡͥϤΤ褦ʾΤѤʤΤǡ
ǤäƶƤʤФʤʤ
ɲåեɤǤ \fIdomainname\fP ˤĤƤƱͤǤ롣
.LP
Τ Linux Ǥϥƥॳ
.BR sethostname (2)

.BR setdomainname (2)
Ȥ롣
.RB  sethostname (2)
ꤵۥ̾ϡ
.B uname
֤빽¤Τ \fInodename\fP եɤƱʸǤ
ȵꤷƤɸ൬ʤϤʤ
(ºݡ256 ХȤΥۥ̾ 8 ХȤΥΡ̾ĤƤ륷ƥ⤢)
Linux ǤƱʸ֤롣
.BR setdomainname (2)
 \fIdomainname\fP եɤˤĤƤƱȤΩġ
.LP
¤ΤΥեɤĹϤޤޤǤ롣
OS 饤֥ˤϡ
ϡɥɤ줿 9, 33, 65, 257 ʤɤͤȤäƤΤ⤢롣
ޤ SYS_NMLN, _SYS_NMLN, UTSLEN, _UTSNAME_LENGTH ʤɤ
ȤäƤ륷ƥ⤢롣
ϤääơȤΤϰͤǤꡢ
sizeof(...) Ȥ٤Ǥ롣
󥿡ͥåȥۥ̾ǻȤΰ뤿ˡ
257 Ф뤳Ȥ¿
.LP
Linux ƥॳ \fIuname\fP() ϤޤǤ 3 ¸ߤ
ǽ \fIuname()\fP Ĺ 9 ȤäƤ
ΤΤĹ 65 ȤäƤ
ߤǤĹ 65 ȤäƤ뤬\fIdomainname\fP եɤɲä줿
.LP
utsname ξϡ
.I sysctl

.IR /proc/sys/kernel/ { ostype ,
.IR hostname ,
.IR osrelease ,
.IR version ,
.IR domainname }
Ȥäƥ뤳ȤǤ롣
.SH Ϣ
.BR uname (1),
.BR getdomainname (2),
.BR gethostname (2)