Section: Linux Programmer's Manual (8)
Updated: 14th August 1994Index
Return to Main Contents
MAKEDEV - create devices
cd dev; ./MAKEDEV -V
cd dev; ./MAKEDEV [ -n ] [ -v ] update
cd dev; ./MAKEDEV [ -n ] [ -v ] [ -d ] device ...
is a script that will create the devices in /dev used to interface
with drivers in the kernel.
Note that programs giving the error ``ENOENT: No such file or
directory'' normally means that the device file is missing, whereas
``ENODEV: No such device'' normally means the kernel does not have the
driver configured or loaded.
Print out version (actually RCS version information) and exit.
Do not actually update the devices, just print the actions that would be
Delete the devices. The main use for this flag is by
Be verbose. Print out the actions as they are performed. This is the
same output as produced by
Since there is currently no standardisation in what names are used for
system users and groups, it is possible that you may need to modify
to reflect your site's settings. Near the top of the file is a mapping
from device type to user, group and permissions (e.g. all CD-ROM devices
are set from the $cdrom variable). If you wish to change the
defaults, this is the section to edit.
- General Options
This only works on kernels which have /proc/interrupts (introduced
during 1.1.x). This file is scanned to see what devices are currently
configured into the kernel, and this is compared with the previous
settings stored in the file called DEVICES.
Devices which are new since then or have a different major number are
created, and those which are no longer configured are deleted.
Create a generic subset of devices. This is the standard devices, plus
floppy drives, various hard drives, pseudo-terminals, console devices,
basic serial devices, busmice, and printer ports.
- acess to physical memory;
- access to kernel virtual memory;
- null device (infinite sink);
- access to I/O ports;
- null byte source (infinite source);
- symlink to /proc/kcore (for kernel debugging);
- always returns ENOSPACE on write;
- to access the controlling tty of a process.
This simply runs
This is a script that can create any local devices.
- Virtual Terminals
This creates the devices associated with the console. This is the virtual
can be from 0 though 63. The device tty0 is the currently active vt, and
is also known as console. For each vt, there are two devices
which are used to generate screen-dumps of the vt (the
is just the text,
includes the attributes).
- Serial Devices
Serial ports and corresponding dialout device. For device
there is also the device
which is used to dial out with. This can avoid the need for cooperative
locks in simple situations.
Dial-in and dial-out devices for the cyclades intelligent I/O serial card.
The dial in device is
and the corresponding dial-out device is
By default devices for 7 lines are created, but this can be changed to
15 by removing the comment.
- Pseudo Terminals
Each possible argument will create a bank of 16 master and slave
pairs. The current kernel (1.2) is limited to 64 such pairs.
The master pseudo-terminals are
and the slaves are
- Parallel Ports
Standard parallel ports. The devices are created
These correspond to ports at 0x3bc, 0x378 and 0x278.
Hence, on some machines, the first printer port may actually be
Ports are named
- Bus Mice
The various bus mice devices. This creates the following devices:
(Logitech bus mouse),
(Microsoft Inport bus mouse) and
(ATI XL bus mouse) and
- Joystick Devices
- Disk Devices
Floppy disk devices. The device
is the device which autodetects the format, and the additional devices are
fixed format (whose size is indicated in the name).
The other devices are named as
The single letter
identifies the type of floppy disk (d = 5.25" DD, h = 5.25" HD, D = 3.5"
DD, H = 3.5" HD, E = 3.5" ED). The number
represents the capacity of that format in K. Thus the standard formats
For more information see Alain Knaff's fdutils package.
are floppy disks on the first controller, and devices
are floppy disks on the second controller.
AT hard disks. The device
provides access to the whole disk, with the partitions being
The four primary partitions are
with the logical partitions being numbered from
(A primary partition can be made into an extended partition, which can hold
4 logical partitions).
By default, only the devices for 4 logical partitions are made. The
others can be made by uncommenting them.
Drives hda and hdb are the two on the first controller. If using the new
IDE driver (rather than the old HD driver), then hdc and hdd are the two
drives on the secondary controller. These devices can also be used to
acess IDE CDROMs if using the new IDE driver.
XT hard disks. Partitions are the same as IDE disks.
- sd[a-z], sd[a-c][a-z], sdd[a-x]
SCSI hard disks. The partitions are similar to the IDE disks, but there
is a limit of 11 logical partitions
This is to allow there to be 128 SCSI disks.
Loopback disk devices. These allow you to use a regular file as a
block device. This means that images of filesystems can be mounted,
and used as normal. This creates 8 devices loop0 through loop7.
- Tape Devices
SCSI tapes. This creates the rewinding tape device
and the non-rewinding tape device
QIC-80 tapes. The devices created are
Floppy driver tapes (QIC-117). There are 4 methods of access depending on
the floppy tape drive. For each of access methods 0, 1, 2 and 3, the
(non-rewinding) are created. For compatability, devices
are symlinks to
- CDROM Devices
SCSI CD players.
Sony CDU-31A CD player.
Mitsumi CD player.
Sony CDU-535 CD player.
LMS/Philips CD player.
Sound Blaster CD player. The kernel is capable of supporting 16 CDROMs,
each of which is accessed as
These are assigned in groups of 4 to each controller.
is a symlink to
Logitech ScanMan32 & ScanMan 256.
Mustek M105 Handscanner.
A4Tek Color Handscanner.
This creates the audio devices used by the sound driver. These include
Devices for the PC Speaker sound driver. These are
Generic SCSI devices. The devices created are
allow arbitary commands to be sent to any SCSI device. This allows for
querying information about the device, or controlling SCSI devices that
are not one of disk, tape or CDROM (e.g. scanner, writeable CDROM).
To allow an arbitary program to be fed input from file descriptor
as the file name. This also creates
BR /dev/stdin ,
BR /dev/stdout ,
BR /dev/stderr .
(Note, these are just symlinks into /proc/self/fd).
Devices (and symlinks) needed by the IBCS2 emulation.
Devices for power management.
Driver for DCF-77 radio clock.
Kernel modules demonstration device. See the modules source.
- Network Devices
Linux used to have devices in /dev for controlling network devices, but
that is no longer the case. To see what network devices are known by the
kernel, look at /proc/net/dev.
Linux Allocated Devices, maintained by H. Peter Anvin,
- SEE ALSO