1 .\" $NetBSD: mknod.8,v 1.27 2003/12/29 02:11:03 atatat Exp $
3 .\" Copyright (c) 1980, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)mknod.8 8.2 (Berkeley) 12/11/93
37 .Nd make device special file
47 .Op Ar driver | Ar major
57 .Ar major unit subunit
78 command creates device special files, or fifos.
79 Normally the shell script
81 is used to create special files for commonly known devices; it executes
83 with the appropriate arguments and can make all the files required for the
86 To make nodes manually, the arguments are:
88 .Bl -tag -width xmxmode
90 Replace an existing file if its type is incorrect.
92 Replace an existing file if its type is incorrect.
93 Correct the mode, user and group.
95 Create device nodes that may be used by an operating system which
96 uses device numbers packed in a different format than
99 This is necessary when
103 server for netbooted computers running other operating systems.
105 The following values for the
126 Specify the group for the device node.
129 operand may be a numeric group ID or a group name.
130 If a group name is also a numeric group ID,
131 the operand is used as a group name.
132 Precede a numeric group ID with a
134 to stop it being treated as a name.
136 Specify the mode for the device node.
137 The mode may be absolute or symbolic, see
140 Specify the user for the device node.
143 operand may be a numeric user ID or a user name.
144 If a user name is also a numeric user ID,
145 the operand is used as a user name.
146 Precede a numeric user ID with a
148 to stop it being treated as a name.
150 Device name, for example
152 for a SCSI disk on an HP300 or a
155 .It Cm b | Cm c | Cm p
157 If the device is a block type device such as a tape or disk drive
158 which needs both cooked and raw special files, the type is
160 All other devices are character type devices, such as terminal
161 and pseudo devices, and are type
166 .It Ar driver | Ar major
167 The major device number is an integer number which tells the kernel
168 which device driver entry point to use.
169 If the device driver is configured into the current kernel it may be
170 specified by driver name or major number.
171 To find out which major device number to use for a particular device,
177 to see if the device is known, or check
178 the system dependent device configuration file:
179 .Bd -filled -offset indent
180 .Dq Pa /usr/src/sys/arch/\*[Lt]arch\*[Gt]/\*[Lt]arch\*[Gt]/conf.c
185 .Pa /usr/src/sys/arch/vax/vax/conf.c
188 The minor device number tells the kernel which one of several similar
189 devices the node corresponds to; for example, it may be a specific serial
191 .It Ar unit No and Ar subunit
192 The unit and subunit numbers select a subset of a device; for example, the
193 unit may specify a particular SCSI disk, and the subunit a partition on
195 (Currently this form of specification is only supported by the
197 format, for compatibility with the
201 A single opaque device number.
202 Useful for netbooted computers which require device numbers packed
203 in a format that isn't supported by
206 List the device drivers configured into the current kernel together with their
207 block and character major numbers.
225 .Fl g , l , m , r , R ,
228 options, and the ability to specify a driver by name appeared in