Nix Installation Guide: Difference between revisions
imported>Mic92 No edit summary |
imported>Mic92 improve check if userns is available. |
||
Line 18: | Line 18: | ||
<code>nix run</code> is the preferred and faster option. | <code>nix run</code> is the preferred and faster option. | ||
However, it might not run on older Linux kernels, or kernels without user namespace support. | However, it might not run on older Linux kernels, or kernels without user namespace support. | ||
With the following command, you can test whether your system supports user namespaces: | With the following command, you can test whether your system supports user namespaces | ||
for unprivileged users: | |||
<syntaxHighlight lang="console"> | <syntaxHighlight lang="console"> | ||
$ unshare --user --pid echo YES | $ unshare --user --pid echo YES | ||
YES | |||
</syntaxHighlight> | </syntaxHighlight> | ||
Line 29: | Line 31: | ||
<syntaxHighlight lang="console"> | <syntaxHighlight lang="console"> | ||
$ zgrep CONFIG_USER_NS /proc/config.gz | $ zgrep CONFIG_USER_NS /proc/config.gz | ||
CONFIG_USER_NS=y | |||
</syntaxHighlight> | </syntaxHighlight> | ||
Line 35: | Line 38: | ||
<syntaxHighlight lang="console"> | <syntaxHighlight lang="console"> | ||
$ grep CONFIG_USER_NS /boot/config-$(uname -r) | $ grep CONFIG_USER_NS /boot/config-$(uname -r) | ||
CONFIG_USER_NS=y | |||
</syntaxHighlight> | </syntaxHighlight> | ||