What Is LXC
What LXC Is and How System Containers Work
LXC containers are system containers that run a complete Linux userspace on the kernel of the host. LXC, short for Linux Containers, is the set of tools that creates and manages them. A system container includes an init system, background services and a package manager, so from the inside it looks much like a small, separate Linux server.
LXC builds on the same kernel features as other container tools. Namespaces give each container its own view of processes, network interfaces and mount points. Control groups (cgroups) limit how much CPU, memory and I/O a container can use. Because the containers share the host kernel, they start quickly and carry very little overhead.
Sharing the kernel is also the main limit. A container cannot run a different kernel from its host, so Linux containers run only on Linux hosts. Isolation is weaker than in a virtual machine, which has its own kernel, so LXC suits trusted workloads better than untrusted code.
How LXD and Incus Make LXC Easier to Manage
LXC is a low-level toolkit, and running it directly takes solid Linux knowledge. LXD adds a management layer on top: a daemon, a REST API, an image store and clustering across machines. LXD was developed by Canonical. Incus is a community-maintained fork of LXD with a similar model. Both let an administrator create a container from an image, start it, and manage it with snapshots and network settings.
System containers appear in hosting in a few ways. Proxmox VE supports LXC containers alongside full virtual machines, so an operator can run lightweight Linux environments next to KVM guests. Some providers offer container-based Linux environments for VPS-style plans, although most VPS products are virtual machines, which give each customer a separate kernel.
Frequently asked questions
Is LXC the Same as Docker?
No. LXC runs system containers that behave like full Linux servers, while Docker usually packages a single application with its dependencies. Both use namespaces and cgroups, but they are designed for different jobs. The LXC vs Docker article compares them in more depth.
Can LXC Run Windows?
No. LXC containers share the Linux kernel of the host, so they can run only Linux userspace. Running Windows requires a virtual machine with its own kernel, typically through a hypervisor such as KVM or Hyper-V.
Is LXC Secure Enough for Untrusted Users?
LXC isolates containers with namespaces and cgroups, but all containers share the host kernel. A kernel flaw could let a process escape its container. For customers who do not trust each other, a virtual machine with its own kernel is generally the safer choice.