LXD LXC

Updated: 26 August 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

Create a snapshot of a container

lxc snapshot container_name snapshot_name

Leave a comment