Linux for Developers Course
Linux for Developers
/
Advanced

Linux Containers (LXC)

Definition

An operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a single control host using a single Linux kernel.

Explain Like I'm New

An apartment building. Virtual Machines are like building 5 separate houses, each with its own plumbing and foundation (Kernel). Containers are an apartment building; they all share the exact same foundation (Kernel), but the walls keep the tenants completely isolated from each other.

Real World Example

Before Docker, sysadmins used LXC to slice a single massive 64-core Linux server into 10 smaller, isolated 'virtual' Linux environments, assigning 6 cores to each, without the massive performance penalty of traditional VMs.

Common Use Cases

  • •High-density server consolidation
  • •The foundational technology behind Docker

Interview Questions

basic

  • Can you run a Windows container on a Linux host kernel?

intermediate

  • What is the core difference between LXC (Linux Containers) and Docker?

Flash Cards

Question

Windows on Linux?

Click to reveal answer
Answer

No. Containers SHARE the host's Kernel. A Windows app cannot speak to a Linux Kernel. A Linux Kernel can only run Linux containers.

Question

LXC vs Docker?

Click to reveal answer
Answer

LXC was designed to emulate a full Operating System (like a lightweight VM). Docker was built on top of LXC technology but shifted the philosophy to single-application containers (e.g., a container that ONLY runs Node.js and nothing else).