Linux OS Internals (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
What is `chroot` and what are its security limitations compared to Containers?
senior LevelSecurity & AuthDocker & Containers
In Simple Words:
chroot changes the apparent root directory (/) for the current running process and its children:
- Limitation (Not a Sandbox):
chrootdoes not isolate processes, network interfaces, or user IDs. - A root user inside a
chrootjail can easily escape by creating a nested chroot or using open file descriptors. Modern containers use Namespaces, Cgroups, and Seccomp for true multi-layered isolation.