Chroot
Rebasing a process's idea of the filesystem root, the oldest and shallowest form of Unix process isolation.
Chroot changes what a process considers the root of the filesystem, /. A process chrooted into /var/jail sees that directory as its entire filesystem — it cannot open, list, or even reference anything above it by path, because as far as its own view goes, nothing above it exists. It's one of the oldest isolation primitives in Unix, dating to 1979, well before namespaces, cgroups, or any container runtime existed.
The isolation it provides is narrower than it sounds. Chroot changes only the filesystem view — a chrooted process still shares the same process table, network stack, and user IDs as everything else on the machine, and it can still see and potentially signal other processes unless something else restricts that. A process running as root inside a chroot can, with well-known techniques, escape it entirely, since root's privileges aren't scoped by the chroot boundary at all. This is why chroot is not considered a security boundary on its own — it was designed to build clean environments (classic uses: building software against a known-clean root, or serving files to an anonymous FTP user who should never see the rest of the disk), not to contain a hostile process.
Linux Namespaces extend the same idea — a private view of one resource — across process IDs, network interfaces, and hostnames, and pair it with Control Groups for resource limits, which is what modern containers actually rest on. Chroot is best understood as the single-resource ancestor of that much larger idea, still useful today for its original narrow purpose but never sufficient alone for running untrusted code.
See also4
Linux Namespaces
The kernel feature that gives a process its own private view of a global resource — the foundation containers are built from.
Systems & Tooling6 connections
Containerization
Packaging an application with its dependencies into an isolated, reproducible runtime unit.
Systems & Tooling20 connections
Control Groups
The Linux kernel feature that caps and accounts for a process group's CPU, memory, and I/O — the resource-limiting half of a container.
Systems & Tooling6 connections
Least Privilege
Granting only the permissions actually required, so a compromise has a small ceiling.
Systems & Tooling17 connections
Linked from3
- HypervisorSystems & Tooling
The layer that lets multiple guest operating systems share one machine's hardware, each believing it owns the machine.
- Init SystemSystems & Tooling
The first userspace process a kernel starts, and the ancestor of every other process on the machine.
- Linux NamespacesSystems & Tooling
The kernel feature that gives a process its own private view of a global resource — the foundation containers are built from.