How to install LXC 3.0

What’s the recommended way to install LXC 3.0? I’ve installed LXD with Snap according to the recommendations, that has gotten me the “lxc” command in “/snap/bin/lxc”. But I am missing the other tools such as “lxc-attach”.

The snap gets you LXD and its tools, not LXC. For LXC 3.0 itself, you can wait for your Linux distribution of choice to package it or you can build it from source.

But LXC and LXD are supposed to play together, aren’t they? Because when I am installing LXD as described above and install an Ubuntu container I can’t login because the image doesn’t contain user accounts. That’s why I want to install lxc-attach so I can get a shell session into the running LXD container.

On a related note, does LXD make use of the new features of LXC 3.0? AFAIK LXD used liblxc but I can’t see how liblxc relates to the LXC distribution. For instance I tried to launch an OCI container in LXD 3 but get the error message “Bad instance type: oci”.