LXC - Linux Containers

Userspace tools for the Linux kernel containers

What's LXC?

LXC is a userspace interface for the Linux kernel containment features.
Through a powerful API and simple tools, it lets Linux users easily create and manage system or application containers.


Current LXC uses the following kernel features to contain processes:

As such, LXC is often considered as something in the middle between a chroot on steroids and a full fledged virtual machine. The goal of LXC is to create an environment as close as possible as a standard Linux installation but without the need for a separate kernel.


LXC is currently made of a few separate components:


LXC is free software, most of the code is released under the terms of the GNU LGPLv2.1+ license, some Android compatibility bits are released under a standard 2-clause BSD license and some binaries and templates are shipped under the GNU GPLv2 license.

Where do I get it?

From upstream

You can fetch the latest upstream tarballs here or grab it directly from git here or with:

git clone git://github.com/lxc/lxc

In your distribution

LXC is packaged by most current Linux distributions, you can then simply install it using your package manager.

Below are some useful links for some of the Linux distributions that are most active in LXC development:



How do I use it?

More details are available in the individual manpages shipped with LXC itself. But a basic example of how to create, start and stop a container would be as follow:

lxc-create -t ubuntu -n p1
lxc-start -n p1 -d
lxc-ls --fancy p1
lxc-stop -n p1

The above will create a basic Ubuntu container called "p1", then start it in the background, get various information about the container including its IP address and finally stop it.

An equivalent using the python3 API would be:

import lxc
container = lxc.Container("p1")

Additional examples about the API may be found in various documentation and howtos listed below. The C API documentation itself is auto-generated and available here.

How can I contribute to it?

Most development discussion happen on our mailing-list.
Patches are usually sent there for review and inclusion in our master branch.
Frequent alpha releases and release candidates are tagged and packaged by some distributions.

Ubuntu users can also use our development packages available in ppa:ubuntu-lxc/daily

Where's the community?

As previously mentioned, most discussions happen on mailing-lists.
We have two of those:

Some of us also hang out in #lxcontainers on irc.freenode.net

What about stable releases?

Our current stable release is LXC 1.0 which was released on the 20th of February 2014.

This release comes with 5 years of bugfix updates and occasional bugfix only releases (1.0.x). LXC 1.0 is the first release to have a dedicated stable branch with long term support but we expect to repeat this with later major releases.

External resources

Here's a list of external documentation, howtos and other relevant posts about current LXC: