Linux namespaces and process views
Worked example
This is an offline lesson. Data are fictional and Docker commands are unexecuted. Any optional execution requires an authorized disposable VM, a verified context, synthetic data, restricted access and no external transmission. Do not collect secrets or private output. Treat the worksheet as offline evidence. Before any separately authorized server query, verify the effective endpoint and its trust boundary, including context overrides. Do not change runtime state, mount host data or modify Desktop settings in this exercise.
Synthetic observation (not live output):Process A: host PID 4120, namespace PID 1, pid namespace P1, net N1, mount M1Process B: host PID 4131, namespace PID 1, pid namespace P2, net N2, mount M2Both: same Linux kernel K1Read-only self observation on an approved Linux VM:readlink /proc/self/ns/pidreadlink /proc/self/ns/mntreadlink /proc/self/ns/netA and B can both have PID 1 because their PID namespaces differ. A mount namespace controls the mount tree visible to a process; a network namespace separates network devices, routes and sockets; UTS separates hostname and domain name, IPC separates certain IPC objects, user namespaces map identities and scope privileges, and cgroup namespaces change the visible cgroup hierarchy. Time namespaces can virtualize selected clocks. Sharing one namespace does not imply sharing all others. The symbolic identifiers P1 and P2 are fictional; real namespace symlinks are kernel-specific identifiers, not stable identities across reboots. The read-only commands show the calling utility’s inherited namespace, not an arbitrary container or proof of isolation. Do not join or create host namespaces in this worksheet. PID 1 is relative to the PID namespace in which it is observed; an ancestor namespace may see a different PID. The self-observation commands are separate Linux-only examples, not lines to run with the fictional inventory. Compare identifiers only within the same running kernel and observation window.
Common mistake
Different namespace IDs do not prove complete security isolation; the kernel and some resources may still be shared.
Manual practice
Explain why both processes can be PID 1. Match network, mount and PID namespaces to a distinct resource view; name one control needed for CPU limits.
Worksheet: lab-fixtures/docker-container-internals/01-namespaces/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Linux namespaces and process views — Knowledge check
Interpret synthetic runtime and isolation evidence and explain kernel and OCI boundaries.
Why can both processes have PID 1?
Which namespace separates mount trees?
What is still shared in the example?