Professional Documents
Culture Documents
0 Securing Services
Filename: techskills-linuxsecurity-3-3-lxc_containers
Title: LXC Containers
Subtitle: Linux Security Techniques
LXC
Open source project
Most contributions come from Canonical/Ubuntu today
Creates "containers" that allow us to isolate applications
Similar to a virtual machine, but shares the kernel with the underlying OS
Better performance
Far less overhead
Applications run isolated, but at full speed
View templates
ls /usr/share/lxc/templates/
Create a container
lxc-create -n <name> -t <template>
lxc-create -n webserver -t /usr/share/lxc/templates/lxc-centos
Containers are stored in /var/lib/lxc
View containers
lxc-ls
lxc-ls --active
lxc-info
Start a container
lxc-start -d -n <name>
-d runs it as a daemon
Stop a container
lxc-stop -n <name>
Delete a container
lxc-destroy -n <name>