Skip to content

Instantly share code, notes, and snippets.

@swyngaard
Last active February 21, 2017 13:24
Show Gist options
  • Save swyngaard/ac0382810bf57ef7296914e41d950488 to your computer and use it in GitHub Desktop.
Save swyngaard/ac0382810bf57ef7296914e41d950488 to your computer and use it in GitHub Desktop.
Allow user to start unprivileged LXC containers from the current bash session in Debian
Enable the ability to start containers in the current shell session:
./start.sh
Alternatively, execute the following set of commands:
$ sudo cgm create all $USER
$ sudo cgm chown all $USER $(id -u $USER) $(id -g $USER)
$ cgm movepid all $USER $$
#!/bin/bash
sudo cgm create all $USER
sudo cgm chown all $USER $(id -u $USER) $(id -g $USER)
cgm movepid all $USER $PPID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment