lxc-lxd
Installation
SKILL.md
Identity
- LXC: low-level Linux container tooling (cgroups + namespaces + bind mounts); CLI is
lxc-*(lxc-start, lxc-ls, etc.) - LXD: higher-level daemon on top of LXC; exposes a REST API; CLI is
lxc(confusingly named); managed vialxdservice - Incus: community fork of LXD after Canonical relicensed LXD to proprietary-friendly CLA in 2023; API-compatible, same
lxcCLI shape but binary isincus - Daemon:
lxd.service(orincus.servicefor Incus); snap-packaged LXD usessnap.lxd.daemon - CLI:
lxcfor LXD;incusfor Incus;lxc-*utilities for bare LXC - Storage root (snap LXD):
/var/snap/lxd/common/lxd/; (deb LXD):/var/lib/lxd/; (Incus):/var/lib/incus/ - Unix socket (snap LXD):
/var/snap/lxd/common/lxd/unix.socket; (deb/Incus):/var/lib/lxd/unix.socketor/run/incus/unix.socket - Config: runtime config via
lxc config set; profiles in daemon database; no flat config files to edit - Install:
snap install lxd(Ubuntu recommended),apt install lxd(deb), orapt install incusfor Incus
Key Operations
| Operation | Command |
|---|---|
| Initialize LXD (first-time wizard) | lxd init |
| Launch container from image | lxc launch ubuntu:24.04 mycontainer |
| Launch with specific profile | lxc launch ubuntu:24.04 mycontainer --profile default --profile custom |
Related skills