[LXD] Commands for LXD/LXC

The commands for lxd/lxc :


Configuring a new LXD installation for the first time

sudo lxd init


Checking LXD version

sudo lxd --version

Listing all image servers

sudo lxc remote list


Getting a list of available images from an image server

sudo lxc image list images:


Getting a filtered image list from an image server


Creating a new container


sudo lxc launch images:[type_of_container] [your_container_name]


Starting a container

sudo lxc start [your_container_name]


Stopping a container

sudo lxc stop [your_container_name]

Removing a container

sudo lxc delete [your_container_name]


Connect to a container via command line

sudo lxc exec [your_container_name] -- /bin/bash




Ref. from: