MKNOD(1) General Commands Manual MKNOD(1)

mknodCreate FIFO, block-special, character-special files

mknod [-m mode] path b|c|u major minor

mknod [-m mode] path p

mknod creates special file at path of the given type:

b
Create block special file
c|u
Create character special file
p
Create FIFO

Both major and minor must be specified when type is b, c, or u, and they must be omitted when type is p. The numbers given in major and minor are interpreted as hexadecimal with a leading 0x or 0X, octal with a leading 0, decimal otherwise.

mode
Set permission of new special file, relative to 0666/rw-rw-rw using the same format as chmod(1).

The mknod utility exits 0 on success, and >0 if an error occurs.

mkfifo(1)

A mknod utility appeared in Version 4 AT&T UNIX.

Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>

2024-04-21 Linux 6.6.67-gentoo-x86_64