1 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" 2007-07-05 mtk: Added details on underlying system call interfaces
25 .\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
26 .\" all rights reserved.
27 .\" Translated Thu Jun 26 21:23:19 JST 1997
28 .\" by SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
29 .\" Updated & Modified Thu Feb 14 21:53:41 JST 2002
30 .\" by Yuichi SATO <ysato@h4.dion.ne.jp>
31 .\" Updated 2007-09-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.64
33 .TH UNAME 2 2008-12-03 "Linux" "Linux Programmer's Manual"
35 uname \- ¸½ºß²ÔƯÃæ¤Î¥«¡¼¥Í¥ë¤Ë¤Ä¤¤¤Æ¤Î̾Á°¤È¾ðÊó¤òÆÀ¤ë
37 .B #include <sys/utsname.h>
39 .BI "int uname(struct utsname *" buf );
44 ¤Ç»Ø¤µ¤ì¤ë¹½Â¤ÂΤ˥·¥¹¥Æ¥à¾ðÊó¤òÊÖ¤¹¡£
48 ¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
53 char sysname[]; /* OS ¤Î̾Á° (Îã: "Linux") */
54 char nodename[]; /* ¡Ö¼ÂÁõ»þ¤ËÄêµÁ¤µ¤ì¤¿¡¢²¿¤é¤«¤Î
55 ¥Í¥Ã¥È¥ï¡¼¥¯¡×¤Ë¤ª¤±¤ë¥Þ¥·¥ó̾ */
56 char release[]; /* OS ¤Î¥ê¥ê¡¼¥¹ (Îã: "2.6.28") */
57 char version[]; /* OS ¤Î¥Ð¡¼¥¸¥ç¥ó */
58 char machine[]; /* ¥Ï¡¼¥É¥¦¥§¥¢¼±ÊÌ»Ò */
60 char domainname[]; /* NIS ¤ä YP ¤Î¥É¥á¥¤¥ó̾ */
67 ¤Ë¤¢¤ëÇÛÎó¤ÎŤµ¤Ï»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤ (¡ÖÃí°Õ¡×¤ÎÀá¤ò»²¾È)¡£
68 ¥Õ¥£¡¼¥ë¥É¤Ï NULL ¥Ð¥¤¥È (\(aq\\0\(aq) ¤Ç½ªÃ¼¤µ¤ì¤ë¡£
70 À®¸ù¤·¤¿¾ì¹ç 0 ¤¬Ê֤롣¼ºÇÔ¤·¤¿¾ì¹ç \-1 ¤¬Ê֤ꡢ
72 ¤¬¥¨¥é¡¼¤ÎÆâÍƤ˽¾¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£
85 ¥á¥ó¥Ð¡¼ (NIS ¤Þ¤¿¤Ï YP ¥É¥á¥¤¥ó̾) ¤Ï GNU ¤Î³ÈÄ¥¤Ç¤¢¤ë¡£
87 ¤³¤ì¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¤¢¤ê¡¢OS ¤Ï̾Á°¡¦¥ê¥ê¡¼¥¹¡¦¥Ð¡¼¥¸¥ç¥ó¤Ê¤É¤ò
88 ¤¿¤Ö¤óʬ¤«¤Ã¤Æ¤¤¤ë¤À¤í¤¦¡£
89 ¤µ¤é¤Ë¤½¤ì¤¬²ÔƯ¤·¤Æ¤¤¤ë¥Ï¡¼¥É¥¦¥§¥¢¤âʬ¤«¤Ã¤Æ¤¤¤ë¤À¤í¤¦¡£
90 ¤è¤Ã¤Æ¹½Â¤ÂΤΠ4 ¤Ä¤Î¥Õ¥£¡¼¥ë¥É¤Ë¤Ï°ÕÌ£¤¬¤¢¤ë¡£
91 °ìÊý¡¢\fInodename\fP ¥Õ¥£¡¼¥ë¥É¤Ë¤Ï°ÕÌ£¤¬¤Ê¤¤:
92 ¤³¤Î¥Õ¥£¡¼¥ë¥É¤Ï¸½ºß¤Î¥Þ¥·¥ó¤Î (ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤)
93 ¤É¤³¤«¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤ª¤±¤ë̾Á°¤òÍ¿¤¨¤ë¤¬¡¢
94 Ä̾ï¥Þ¥·¥ó¤ÏÊ£¿ô¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ë°¤·¡¢Ê£¿ô¤Î̾Á°¤ò»ý¤Ä¡£
95 ¤µ¤é¤Ë¡¢¥«¡¼¥Í¥ë¤Ï¤³¤Î¤è¤¦¤Ê¾ðÊó¤òÃΤë½Ñ¤ò»ý¤¿¤Ê¤¤¤Î¤Ç¡¢
96 ¤³¤³¤Ç¤ÎÅú¤¨¤ÏÁ°¤â¤Ã¤Æ¶µ¤¨¤Æ¤ä¤é¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
97 ¤³¤ì¤ÏÄɲåե£¡¼¥ë¥É¤Ç¤¢¤ë \fIdomainname\fP ¤Ë¤Ä¤¤¤Æ¤âƱÍͤǤ¢¤ë¡£
99 ¤³¤Î¤¿¤á Linux ¤Ç¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë
102 .BR setdomainname (2)
104 .RB ¡Ö sethostname (2)
105 ¤ÇÀßÄꤵ¤ì¤ë¥Û¥¹¥È̾¤Ï¡¢
107 ¤ÇÊÖ¤µ¤ì¤ë¹½Â¤ÂΤΠ\fInodename\fP ¥Õ¥£¡¼¥ë¥É¤ÈƱ¤¸Ê¸»úÎó¤Ç¤¢¤ë¡×
108 ¤Èµ¬Äꤷ¤Æ¤¤¤ëɸ½àµ¬³Ê¤Ï¤Ê¤¤
109 (¼ÂºÝ¡¢256 ¥Ð¥¤¥È¤Î¥Û¥¹¥È̾¤È 8 ¥Ð¥¤¥È¤Î¥Î¡¼¥É̾¤òµö²Ä¤·¤Æ¤¤¤ë¥·¥¹¥Æ¥à¤â¤¢¤ë)¡£
110 ¤·¤«¤·¡¢Linux ¤Ç¤ÏƱ¤¸Ê¸»úÎó¤¬ÊÖ¤µ¤ì¤ë¡£
111 .BR setdomainname (2)
112 ¤È \fIdomainname\fP ¥Õ¥£¡¼¥ë¥É¤Ë¤Ä¤¤¤Æ¤âƱ¤¸¤³¤È¤¬À®¤êΩ¤Ä¡£
114 ¹½Â¤ÂΤΥե£¡¼¥ë¥É¤ÎŤµ¤Ï¤µ¤Þ¤¶¤Þ¤Ç¤¢¤ë¡£
115 OS ¤ä¥é¥¤¥Ö¥é¥ê¤ÎÃæ¤Ë¤Ï¡¢
116 ¥Ï¡¼¥É¥³¡¼¥É¤µ¤ì¤¿ 9, 33, 65, 257 ¤Ê¤É¤ÎÃͤò»È¤Ã¤Æ¤¤¤ë¤â¤Î¤â¤¢¤ë¡£
122 ¤Ê¤É¤ò»È¤Ã¤Æ¤¤¤ë¥·¥¹¥Æ¥à¤â¤¢¤ë¡£
123 ¤Ï¤Ã¤¤ê¸À¤Ã¤Æ¡¢¤³¤ì¤é¤ÎÄê¿ô¤ò»È¤¦¤Î¤Ï°¤¤¹Í¤¨Êý¤Ç¤¢¤ê¡¢
124 sizeof(...) ¤ò»È¤¦¤Ù¤¤Ç¤¢¤ë¡£
125 ¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥Û¥¹¥È̾¤Ç»È¤¦Îΰè¤ò»ý¤¿¤»¤ë¤¿¤á¤Ë¡¢
126 257 ¤¬Áª¤Ð¤ì¤ë¤³¤È¤¬Â¿¤¤¡£
129 .IR /proc/sys/kernel/ { ostype ,
134 ¤ò»È¤Ã¤Æ¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤â¤Ç¤¤ë¡£
135 .SS Çظå¤Î¥«¡¼¥Í¥ë¡¦¥¤¥ó¥¿¥Õ¥§¡¼¥¹
139 ¹½Â¤ÂΤΥµ¥¤¥º¤¬Â礤¯¤Ê¤ê¡¢¤³¤Î±Æ¶Á¤Ç
141 ¤Ë¤Ï 3¤Ä¤Î¥Ð¡¼¥¸¥ç¥ó¤¬Â¸ºß¤¹¤ë:
144 .IR __NR_oldolduname )¡¢
147 .IR __NR_olduname )¡¢
152 .\" ¤³¤ì¤Ï Linux 1.0 ¤è¤êÁ°¤ËÁ̤ëÏäǤ¢¤ë¡£
153 ¤Ï¤¹¤Ù¤Æ¤Î¥Õ¥£¡¼¥ë¥É¤¬Ä¹¤µ 9 ¤ò»È¤Ã¤Æ¤¤¤¿¡£
155 .\" ¤³¤ì¤â Linux 1.0 ¤è¤êÁ°¤ËÁ̤ëÏäǤ¢¤ë¡£
156 ¤ÏŤµ 65 ¤ò»È¤Ã¤Æ¤¤¤¿¡£
158 ¤âŤµ 65 ¤ò»È¤Ã¤Æ¤¤¤ë¤¬¡¢
159 \fIdomainname\fP ¥Õ¥£¡¼¥ë¥É¤¬Äɲ䵤ì¤Æ¤¤¤ë¡£
162 ¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï¡¢¤³¤ì¤é¤Î¾ÜºÙ¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤«¤é±£Êä·¡¢
163 ¥«¡¼¥Í¥ë¤¬Ä󶡤·¤Æ¤¤¤ë¥·¥¹¥Æ¥à¥³¡¼¥ë¤Î¤¦¤ÁºÇ¿·¤Î¥Ð¡¼¥¸¥ç¥ó¤òµ¯Æ°¤¹¤ë¡£
166 .BR getdomainname (2),