Create a FIFO with `mkfifo` and let processes exchange data through a filesystem entry. 16.11.2025 | reading time: 3 min A named pipe, or FIFO, is a filesystem object that lets one process write data that another process reads; this guide shows how to create a FIFO with `mkfifo`, what to expect when processes connect, and a hands-on producer/consumer example to try now. Quick chat example Try this on a workstation with two terminals to feel how FIFOs behave: ```bash mkfifo /tmp/chat.fifo # Terminal 1: start a reader cat /tmp/chat.fifo # Terminal 2: send a message echo "Hello from writer" > /tmp/chat.fifo # Terminal 1 output: Hello from writer ``` What actually happens A FIFO persists as a special file until removed and opens block by default: a writer will wait until a reader opens the pipe and vice versa; POSIX guarantees atomic writes up to PIPE_BUF (at least 512 bytes; often 4096 on modern systems), so small writes from a single process arrive intact, and permissions apply like any file so use `chmod` to restrict access. Practical uses and caveats Use FIFOs for simple IPC, logging funnels, or to connect command pipelines between unrelated processes; beware of blocking behavior for interactive use, consider opening the FIFO with nonblocking flags in programs, and remember that multiple writers/readers change delivery semantics compared with anonymous pipes. Tools that pair well with FIFOs Beyond `mkfifo` you will meet `mknod` for legacy device creation, `socat` to bridge FIFOs and network sockets, and `inotifywait` to watch FIFO creation or access, while common utilities like `tee`, `cat` and `nc` are handy for wiring data streams in scripts. Next steps Create a few test FIFOs, script producer/consumer pairs, and observe behavior under load to build intuition; if you want a structured path, dive deeper into Linux internals and consider exam preparation such as CompTIA Linux+ or LPIC-1 with intensive courses at bitsandbytes.academy to turn hands-on skills into certification. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities scripting processes storage troubleshooting