Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use LXC to 'container' plugins my application is loading. Am I able to do this through C? I have been Googling a lot about it, but there don't seem to be any headers, only scripts that can be called through the terminal.

I know I can execute the scripts inside C, but I'd rather use the headers if there are any.

share|improve this question
up vote 3 down vote accepted

If you look at the LXC homepage, you'll notice liblxc referred to, implying there's an ABI, and if you look further down, you'll notice a link to the C API documentation.

That page looks empty at first because it has been done (rather lazily, I think) with doxygen. However, if you start clicking around you'll find stuff. Just keep in mind, again, that it's auto-generated from source and perhaps not a huge effort was put into annotating that in a doxygen friendly way. Another perhaps confusing thing is all the actual functions are documented via function pointers in data structures (looks like an OO-ish interface).

But if you already know how to use LXC on the command line you should be able to deduce some correlations.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.