Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

mknod(8)

Name

mknod - make a special file

Synopsis

mknod name b major minor
mknod name c major minor
mknod name p

Description

mknod makes a directory entry for a special file.

Options

The following options are supported:

b

Create a block-type special file.

c

Create a character-type special file.

p

Create a FIFO (named pipe).

Operands

The following operands are supported:

major

The major device number.

minor

The minor device number; can be either decimal or octal. The assignment of major device numbers is specific to each system. You must be the super-user to use this form of the command.

name

A special file to be created.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os

See Also

ftp(1), mknod(2), symlink(2), attributes(7)

Notes

If mknod(2) is used to create a device, the major and minor device numbers are always interpreted by the kernel running on that machine.

With the advent of physical device naming, it would be preferable to create a symbolic link to the physical name of the device (in the /devices subtree) rather than using mknod.