% lxc # List remote repositories lxc remote list # List images available on repository lxc image list : # List images available on repository, filtering by a partial distro name lxc image list : # List local downloaded images from repositories lxc image list # List profiles: lxc profile list # Show profile configuration lxc profile show # Copy default profile lxc profile copy # List storage pools: lxc storage list # launch (create) a container, with custom name and profile lxc launch : --profile -s # launch (create) a container lxc launch : -s # Start a container lxc start # Stop a container lxc stop # Create a new container from an existing one lxc copy # Renames a container lxc move # Attach a network to an existing container (e.g. network-name: "default") lxc network attach # List all containers lxc list # Delete a container lxc delete # Open an interactive session inside a container (as root) lxc exec /bin/bash # Open an interactive session inside a container (as given user) lxc exec su - # Autostart container (1-autostart, 0-do not autostart) lxc config set boot.autostart 1 # Set a delay in seconds after starting a container, before starting the next lxc config set boot.autostart.delay # Change memory limit for running container (e.g value: 512MB) lxc config set limits.memory # Change cpu limit for running container (e.g value: 2) - you can check it worked with nproc command inside container lxc config set limits.cpu # Set which containers are started first (higher numbers are started first) lxc config set boot.autostart.order # Set the container as privileged - it has "root permissions" on the host lxc config set security.privileged true # Enable nesting, so that I can have lxd on the container to create other containers inside it lxc config set security.nesting true # Show container configuration (shows limits and other info) lxc config show # Create a snapshot (if you can, stop it before doing that) lxc snapshot # Restore a snapshot lxc restore # See info on the container (including snapshots) lxc info # Delete a snapshot lxc delete -i # Push files from host to the container lxc file push / # Pull files from the container to host lxc file pull / # Create another image based on existing container (enter the container, do the desired changes, and then:) lxc publish --alias