Caution: This version of this document is no longer maintained. For the latest documentation, see


Make FIFO special files (POSIX)


mkfifo [-p] [-m mode] file...

Runs on:



-m mode
When creating the FIFO special file, set the file permission bits of the new file to the specified mode value.

The mode option argument is a symbolic_mode string, as defined for the chmod utility. In the symbolic_mode strings, the op characters + and - are interpreted relative to the default file mode for that file type, as follows:

Add permissions to the default mode.
Delete permissions from the default mode.
Assign permissions.
Create directories in the FIFOs pathname, if required.
The pathname at which a FIFO special file is to be created.


The mkfifo utility creates the FIFO special files specified by the file operands in the order they're specified.

To create a FIFO in a directory, you must have write permission for that directory or be logged in as root.

The default file mode for FIFO files is a=rw (666) with selected permissions removed in accordance with the file mode creation mask (see umask). For intermediate pathname components created by mkfifo, the mode is the default modified by u+wx so that any subdirectories and the FIFO file can always be created regardless of the file mode creation mask. If you wish to assign different ultimate permissions for the intermediate directories, you can change these permissions afterward with the chmod utility.

Exit status:

> 0
An error occurred.


If the mkfifo utility is terminated by a signal, some of the specified FIFO special files or intermediate directories might have already been created, and may not be automatically removed.

See also:

chmod, ln, mkdir, touch