whatis namespace
Namespace
Also known as: Linux namespaces
A kernel feature that gives a process its own isolated view of a system resource, such as PIDs, mounts, network, users, or hostname.
What Is a Namespace in Linux?
There are namespaces for process IDs, mount points, network stacks, hostnames (UTS), IPC, user IDs, cgroups, and time. A process in a new PID namespace sees itself as PID 1; one in a new network namespace has only its own interfaces.
Containers are essentially processes launched in a fresh set of namespaces. User namespaces are what make rootless containers possible.
Example
lsns
sudo unshare --pid --fork --mount-proc bash Learn more about Namespace
- Linux Namespaces Explained: What a Container Actually Is A container is not a thing the kernel knows about. It is a normal process with a restricted view of the system, built from namespaces, cgroups, and a changed root. Here is what each piece does.
- Rootless Containers: Running Podman and Docker Without a Root Daemon Rootless containers run as your ordinary user, so a container escape lands in an unprivileged account rather than as root. Here is how the UID mapping works and which limitations you will actually hit.
- systemd-nspawn: Containers Without a Container Runtime How systemd-nspawn runs a full OS in a namespace with no daemon and no image registry, and where it fits between chroot and Docker.