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.

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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