After doing some reading, I found that Linux user namespaces are generally supported in Linux versions >= 3.8. However, there's a possibility that user namespaces are disabled on a given OS, making the check for kernel versions unreliable. Is there a robust way to check if the current OS I'm using supports user namespaces and has it available to use?
There are two places you can check to see if your kernel supports user namespaces:
/boot/config-*
. (find out which one you are actually using with uname -a
)/proc/config.gz
.In both files look for CONFIG_USER_NS
. If it reads CONFIG_USER_NS=y
you're golden. If not, well, you're about to compile a new kernel.