Updated: 30 September 2025
See https://canonical.com/lxd
Support https://discuss.linuxcontainers.org/
List instances
lxc ls
List instances in longer json format
lxc list --format=json | jq
Start instance win11 and immediately attach to the console
lxc start win11 --console=vga
Start a container
lxc launch ubuntu:24.04
Start a virtual machine
lxc launch ubuntu:24.04 --vm
Prevent a container from automatically starting whenever the LXD host starts
lxc config set the_container boot.autostart false
Stop the instance called win11, with force
lxc stop --force win11
Delete container win11
lxc delete win11
Snapshots
Create a snapshot of a container
lxc snapshot container_name snapshot_name
Restore a snapshot
Show a list of available snapshots
lxc info container_name
Select and restore a snapshot
lxc restore container_name snapshot_name
Devices
Remove a device e.g. iso CD
lxc config device remove container_name name_of_device