Linux Containers Installation
Insall package
sudo snap install lxd
sudo usermod -aG lxd $USER
sudo chmod 777 /var/snap/lxd/common/lxd/unix.socket
Initial setup
lxd init
lxd init --minimal
cat lxd-config.yaml | sudo lxd init --preseed
Images
lxc remote list
lxc image info ubuntu:lts
lxc image list ubuntu:22.04
lxc image list ubuntu:24.04
lxc image list images:centos
Launch container
sudo lxc launch images:centos/9-Stream centos-9
sudo lxc launch ubuntu:24.04 ubuntu-24
Container Info
lxc list
lxc info ubuntu-24
lxc stop
Login to container
Shell login
lxc shell ubuntu-24
Run commands
lxc exec ubuntu-24 -- bash