-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux mkfifo Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to mkfifo on Linux, covering Arch Linux, CachyOS, and other distributions including named pipe creation, FIFO creation, and inter-process communication.
mkfifo creates named pipes (FIFOs).
Uses:
- Named pipes: Create FIFO special files
- IPC: Inter-process communication
- Process communication: Communication between processes
- Data streaming: Stream data between processes
Why it matters:
- IPC: Enable process communication
- Data flow: Stream data between processes
- Synchronization: Synchronize processes
Basic usage:
# Create named pipe
mkfifo mypipe
# Creates FIFO named "mypipe"Set permissions:
# With permissions
mkfifo -m 666 mypipe
# -m = mode (666 permissions)Basic FIFO:
# Create FIFO
mkfifo mypipe
# Creates named pipeMultiple pipes:
# Multiple FIFOs
mkfifo pipe1 pipe2 pipe3
# Creates multiple named pipesSend data:
# Write to FIFO
echo "Hello" > mypipe
# Sends data to pipeReceive data:
# Read from FIFO
cat < mypipe
# Receives data from pipeCheck installation:
# mkfifo is part of coreutils
# Usually pre-installed
# Check mkfifo
which mkfifoThis guide covered mkfifo usage, named pipe creation, and inter-process communication for Arch Linux, CachyOS, and other distributions.
- mknod Guide - Device node creation
- Process Management - Process management
- Bash Scripting Guide - Scripting basics
-
mkfifo Documentation:
man mkfifo
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.