MAKEDEV
Create device files in the /dev directory
SYNOPSIS
MAKEDEV [options] device_name...
PARAMETERS
device_name
Specifies the name of the device file to create. Can be a single device name or a list of device names or wildcard pattern.
-v
Verbose mode; prints more information.
-n
No execute mode; only prints the commands that would be executed.
DESCRIPTION
The MAKEDEV command is a shell script, traditionally found in /dev, used to create device files. These files provide an interface between user space applications and hardware devices.
The command simplifies the process of creating device nodes, which are special file types that represent hardware. It handles the often complex task of assigning major and minor device numbers correctly. While modern Linux systems prefer dynamic device management (udev/systemd-udevd), MAKEDEV can still be useful, particularly in embedded systems or legacy environments where manual device node creation is necessary.
CAVEATS
On modern Linux systems, udev or systemd-udevd are the preferred mechanisms for device node creation. MAKEDEV is often deprecated or removed in favor of dynamic device management. Directly creating device nodes with MAKEDEV can lead to inconsistencies if the system also uses udev. Requires root privileges to create device files in /dev.
MAJOR AND MINOR NUMBERS
Device files are identified by a major and minor number. The major number identifies the device driver, and the minor number identifies a specific instance of the device. MAKEDEV often uses a lookup table to determine the correct major and minor numbers for a given device name.
EXAMPLE
To create a device file named ttyS0:
./MAKEDEV ttyS0
This command, run from within the /dev directory, creates the ttyS0 device node.
HISTORY
Originally, MAKEDEV was a crucial utility for manually creating device files in /dev. It predates the widespread adoption of dynamic device management systems like udev. Its use has declined as modern systems automate device node creation, however it is still useful in legacy systems or environments that are not yet using dynamic device management.
SEE ALSO
mknod(1), udev(7)