Skip to main content
InterviewHubPRO
Section Overview
Q21

Question 21 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

42%
Linux OS Internals (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

What are Linux Namespaces and what are the 7 core Namespace types?

senior LevelCode Examplelinux-osAdvanced Internals

In Simple Words: Namespaces are the foundational isolation mechanism of Docker containers:

  • A namespace wraps a global system resource in an abstraction, making processes inside believe they have their own dedicated copy:
  1. PID Namespace: Process isolation (container process sees itself as PID 1).
  2. NET Namespace: Dedicated virtual network interfaces, IP addresses, and routing tables.
  3. MNT (Mount) Namespace: Isolated filesystem mount points.
  4. IPC Namespace: Isolated shared memory and message queues.
  5. UTS Namespace: Isolated hostname and domain name.
  6. USER Namespace: Maps container root user (UID 0) to an unprivileged user on the host OS.
  7. CGROUP Namespace: Isolates cgroup root directory views.
text
Container Primitives Architecture:
┌────────────────────────────────────────────────────────┐
│                   DOCKER CONTAINER                     │
│  [Namespaces: Isolated PID, Net, Mount, User, IPC]     │
│  [Cgroups: Resource Limits on CPU, Memory, Disk I/O]   │
└──────────────────────────┬─────────────────────────────┘
                           ▼
                  [Linux Kernel Layer]