$linuxjunkies
>

IPC namespace

also: ipc ns, CLONE_NEWIPC

An IPC namespace isolates inter-process communication resources (message queues, semaphores, shared memory) so that processes in different namespaces cannot access each other's IPC objects.

The IPC (Inter-Process Communication) namespace is a Linux kernel feature that creates isolated environments for System V IPC mechanisms. Each namespace maintains its own set of message queues, semaphores, and shared memory segments, preventing processes in one namespace from interfering with or accessing IPC resources in another.

This is commonly used in containerization and process isolation. For example, two Docker containers can each have their own message queue with the same identifier without conflict, because they operate in separate IPC namespaces.

You can create a new IPC namespace using unshare --ipc or clone() with the CLONE_NEWIPC flag. The ip netns and container tools like Docker automatically set up isolated IPC namespaces for each container.

Related terms