What is a named pipe (FIFO) in Linux?

Answer

A named pipe (FIFO) is a special file that provides inter-process communication (IPC) in a first-in-first-out manner. Unlike regular pipes (|) which only exist between related processes, named pipes exist as filesystem entries and allow unrelated processes to communicate. Create with: mkfifo /tmp/mypipe. Process A writes: echo "data" > /tmp/mypipe (blocks until a reader appears). Process B reads: cat /tmp/mypipe (blocks until data is written). Named pipes have no disk storage — data flows directly in memory. Use cases: streaming data between processes, avoiding temporary files, creating simple producer-consumer patterns. Clean up with rm /tmp/mypipe.