1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 05:02:10 +02:00
tldr/pages/linux/mknod.md
K.B.Dharun Krishna 898f711019
pages/*: update GNU coreutils links, sync translation pages (#15543)
Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2025-01-18 18:45:33 +05:30

626 B

mknod

Create block or character device special files. More information: https://www.gnu.org/software/coreutils/manual/html_node/mknod-invocation.html.

  • Create a block device:

sudo mknod {{path/to/device_file}} b {{major_device_number}} {{minor_device_number}}

  • Create a character device:

sudo mknod {{path/to/device_file}} c {{major_device_number}} {{minor_device_number}}

  • Create a FIFO (queue) device:

sudo mknod {{path/to/device_file}} p

  • Create a device file with default SELinux security context:

sudo mknod -Z {{path/to/device_file}} {{type}} {{major_device_number}} {{minor_device_number}}