MKNOD(8) BSD System Manager's Manual MKNOD(8)NAMEmknod - build special file
SYNOPSISmknod name [c | b] major minor
mknod name [c | b] major unit subunit
DESCRIPTION
The mknod command creates device special files. Normally the shell
script /dev/MAKEDEV is used to create special files for commonly known
devices; it executes mknod with the appropriate arguments and can make
all the files required for the device.
To make nodes manually, the required arguments are:
name Device name, for example ``sd'' for a SCSI disk or ``pty'' for
pseudo-tty devices.
b | c Type of device. If the device is a block type device such as a
tape or disk drive which needs both cooked and raw special files,
the type is b. All other devices are character type devices, such
as terminal and pseudo devices, and are type c.
major The major device number is an integer number which tells the ker-
nel which device driver entry point to use. To learn what major
device number to use for a particular device, check the file
/dev/MAKEDEV to see if the device is known, or check the system
dependent device configuration file:
``/usr/src/sys/architecture/conf/ioconf.c.architecture''
(for example /usr/src/sys/i386/conf/ioconf.c.i386).
minor The minor device number tells the kernel which unit and/or sub-
unit the node corresponds to on the device. It may be further
subdivided into a unit and subunit. For example, there might be a
single minor value specifying a tty line, or the unit might spec-
ify a disk unit number (a single drive) with the subunit being a
partition on that drive.
The numeric parameters are specified using C syntax: a leading `0x' indi-
cates that the parameter is hexadecimal, a leading `0' indicates an octal
parameter, and otherwise the parameter is treated as decimal.
SEE ALSOmkfifo(1), mknod(2), MAKEDEV(8)HISTORY
A mknod command appeared in Version 6 AT&T UNIX. The separate unit and
subunit appeared in BSD/OS 2.0.
4th Berkeley Distribution November 11, 1994 1