161501Sbostic.\" Copyright (c) 1980, 1991, 1993 261501Sbostic.\" The Regents of the University of California. All rights reserved. 318889Smckusick.\" 447463Scael.\" %sccs.include.redist.man% 518889Smckusick.\" 6*65103Smckusick.\" @(#)mknod.8 8.2 (Berkeley) 12/11/93 747463Scael.\" 847463Scael.Dd 947463Scael.Dt MKNOD 8 1047463Scael.Os BSD 4 1147463Scael.Sh NAME 1247463Scael.Nm mknod 1347463Scael.Nd build special file 1447463Scael.Sh SYNOPSIS 1547463Scael.Nm mknod 1647463Scael.Ar name 1747463Scael.Op Cm c | Cm b 1847463Scael.Ar major minor 1947463Scael.Sh DESCRIPTION 2047463ScaelThe 2147463Scael.Nm mknod 2247463Scaelcommand creates device special files. 2347463ScaelNormally the shell script 2447463Scael.Pa /dev/MAKEDEV 2547463Scaelis used to create special files for commonly known devices; it executes 2647463Scael.Nm mknod 2747463Scaelwith the appropriate arguments and can make all the files required for the 2847463Scaeldevice. 2947463Scael.Pp 3047463ScaelTo make nodes manually, the four required arguments are: 3147463Scael.Pp 3247463Scael.Bl -tag -width majorx 3347463Scael.It Ar name 3447463ScaelDevice name, for example 3547463Scael.Dq sd 3647463Scaelfor a SCSI disk on an HP300 or a 3747463Scael.Dq pty 3847463Scaelfor pseudo-devices. 3947463Scael.It Cm b | Cm c 4047463ScaelType of device. If the 4147463Scaeldevice is a block type device such as a tape or disk drive which needs 4247463Scaelboth cooked and raw special files, 4347463Scaelthe type is 4447463Scael.Cm b . 4547463ScaelAll other devices are character type devices, such as terminal 46*65103Smckusickand pseudo devices, and are type 4747463Scael.Cm c . 4847463Scael.It Ar major 4947463ScaelThe major device number is an integer number which tells the kernel 5047463Scaelwhich device driver entry point to use. To learn what 5147463Scaelmajor device number to use for a particular device, check the file 5247463Scael.Pa /dev/MAKEDEV 5347463Scaelto see if the device is known, or check 5447463Scaelthe system dependent device configuration file: 5547463Scael.Bd -filled -offset indent 5647463Scael.Dq Pa /usr/src/sys/conf/device. Ns Em architecture 5747463Scael.Ed 5847463Scael.Pp 5947463Scael(for example 6047463Scael.Pa device.hp300 ) . 6147463Scael.It Ar minor 6247463ScaelThe minor device number tells the kernel which subunit 6347463Scaelthe node corresponds to on the device; for example, 6447463Scaela subunit may be a filesystem partition 6547463Scaelor a tty line. 6647463Scael.El 6747463Scael.Sh SEE ALSO 6847463Scael.Xr mknod 2 , 6947463Scael.Xr makedev 8 7047463Scael.Sh HISTORY 7147463ScaelA 7247463Scael.Nm 7347463Scaelcommand appeared in Version 6 AT&T UNIX. 74