Skip to main content

Linux Containers (LXC)

Linux Containers (LXC) are an operating system type of virtualization. This operating system type of virtualization uses the Linux facilities of cgroups and namespaces. This allows virtualization of items like CPUs, memory, block I/O, networks, etc.

The virtual LXC environments are more similar to chroot with high security than with a KVM or VMware virtual machines.

  • Lightweight
  • Full-featured
  • Unique:
    • network stack
    • process table
    • users and groups
    • ... or just about anything required for an operating system.

Linux Containers (LXC) operate in a separate namespace from the default system isolating many of the OS constructs like IPC, network, process table, etc.

The installation of a LXC container is to a directory that becomes the LXC container’s root filesystem. Within the rootfs directory is only the essential programs and data files that are required, and this is usually small (in the 500MB range).

The LXC container uses the same kernel and devices as the base operating system avoiding the duplication of resources found in Virtual Machines.

Some common utilities could be missing from a LXC container like the less command but within the rootfs of the container one could add almost any application desired, such as a web server.