Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

mknod

v(uutils coreutils) 0.1.0

Options

--mode=<MODE>, -m <MODE>

mknod-help-mode

mknod-help-name

mknod-help-type

mknod-help-major

mknod-help-minor

-Z

mknod-help-selinux

--context=<CTX>

mknod-help-context

Examples

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 |--context=]}}{{path/to/device_file}} {{type}} {{major_device_number}} {{minor_device_number}}

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.