Sample Header Ad - 728x90

How to enable user_namespaces in the kernel? (For unprivileged `unshare`.)

12 votes
1 answer
30970 views
My Linux kernel must have been configured with [user_namespaces](http://man7.org/linux/man-pages/man7/user_namespaces.7.html) when built, but their use is restricted after boot and has to be explicitly enabled. Which sysctl should I use? (If this was turned on, this would allow to run an isolation command like unshare --user --map-root-user --mount-proc --pid --fork, and then perform [chroot without being root](https://unix.stackexchange.com/q/72696/4319)--a much anticipated feature of Linux.)
Asked by imz -- Ivan Zakharyaschev (15862 rep)
Aug 13, 2016, 04:37 PM
Last activity: Mar 27, 2023, 11:03 AM