Linux MAKEDEV Command
Complete List of Linux Commands
AKEDEV is a tool used to create device nodes in Linux systems. In Unix/Linux systems, device nodes exist as special files located in the /dev directory, used to communicate with hardware devices or virtual devices provided by the kernel.
Syntax
MAKEDEV -V MAKEDEV [ -n ] [ -v ] update MAKEDEV [ -n ] [ -v ] [ -d ] device ...
Basic Usage
MAKEDEV is usually located in the /dev directory, and its usage is:
cd /dev ./MAKEDEV [选项] 设备名...
Common Device Name Examples
tty- Terminal devicesttyS- Serial port deviceshd- IDE hard disk devicessd- SCSI/SATA hard disk devicesfd- Floppy disk deviceslp- Parallel port devicesmem- Memory devicesnull- Null deviceszero- Zero devicesrandom- Random number devices
Modern Alternatives
In modern Linux systems, MAKEDEV has been replaced by the following mechanisms:
- devtmpfs- The kernel-automatically-created dynamic
/devfile system - udev- User-space device manager, which dynamically manages device nodes
Notes
- Modern Linux distributions generally do not require manual use of MAKEDEV.
- Operating
/devthe /dev directory usually requires root privileges. - Incorrect creation of device nodes can cause system devices to malfunction.
Examples
Create serial port devices ttyS0 and ttyS1:
cd /dev sudo ./MAKEDEV ttyS0 ttyS1
View which devices will be created but don't actually execute:
cd /dev sudo ./MAKEDEV ttyS0 ttyS1
In most modern systems, device nodes are automatically created, and manual use of MAKEDEV is relatively rare.
Other Extensions