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