The lxc package adds several commands to your system. These include:
- lxc-create: This is to create an lxc container
- lxc-ls: This is a list of the available containers
- lxc-start: This is to start a container
- lxc-stop: This is to stop a container
- lxc-attach: This is to connect to the root shell of a container
- lxc-console: This is to connect to a login session in a container
On Red Hat-based systems, you may need to disable SELinux while testing. On OpenSuSE systems, you may need to disable AppArmor. You'll need to reboot after disabling AppArmor via yast2.
Linux containers come in two basic flavors: privileged and unprivileged. Privileged containers are created by the root and the underlying system has root privileges. An unprivileged container is created by a user and only has user privileges.
Privileged containers are easier to create and more widely supported since they don't require uid and gid mapping, device permissions, and so on. However, if a user or application manages to escape from the container, they'll have full privileges on the host.
Creating a privileged container is a good way to confirm that all the required packages are installed on your system. After you create a privileged container, use unprivileged containers for your applications.