Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux MAKEDEV Command

Linux MAKEDEV Command

Linux Command Reference Linux Command Reference

MAKEDEV is a tool for creating device nodes in Linux systems. In Unix/Linux systems, device nodes exist as special files located under 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 is used as follows:



cd /dev

./MAKEDEV [选项] 设备名...

Examples of Common Device Names

Modern Alternatives

In modern Linux systems, MAKEDEV has been replaced by the following mechanisms:

  1. devtmpfs - Dynamic device nodes automatically created by the kernel /dev Filesystem
  2. udev - Userspace device managers that dynamically manage device nodes

Notes


Example

Create the serial devices ttyS0 and ttyS1:



cd /dev

sudo ./MAKEDEV ttyS0 ttyS1

See which devices would be created without actually doing so:



cd /dev

sudo ./MAKEDEV ttyS0 ttyS1

On most modern systems, device nodes are created automatically, so manually using MAKEDEV is relatively rare.

Linux Command Reference Linux Command Reference