# LXC usage examples ## Install ``` bash apt install apparmor apparmor-utils debootstrap lxc-templates lxc ``` ## Create new container ``` bash lxc-create -t debian -n NAME ``` * optionally, set custom location: `-P /path/to/lxc` (default: `/var/lib/lxc`) ## Run ### Foreground (debug) ``` bash lxc-start -n NAME -F ``` ### Background ``` bash lxc-start -n NAME -d ``` ## Login ``` bash lxc-attach -n NAME ``` ## Stop ``` bash lxc-stop -n NAME ```