Change root: Difference between revisions
imported>Mic92 example for nixos-enter |
imported>Mic92 No edit summary |
||
Line 11: | Line 11: | ||
Then run <code>nixos-enter</code>: | Then run <code>nixos-enter</code>: | ||
<syntaxHighlight | <syntaxHighlight lang=console> | ||
$ nixos-enter | $ nixos-enter | ||
</syntaxHighlight> | </syntaxHighlight> |
Revision as of 11:40, 5 April 2018
Chroot is an operation that changes the apparent root directory for the current running process and their children. A program that is run in such a modified environment cannot access files and commands outside that environmental directory tree. This modified environment is called a chroot jail.
Usage
nixos-enter allows to access a nixos installation from a rescue system.
Using nixos-enter
The nixos-enter program is part of nixos. Before it runs provides a shell, the script mounts api filesystems like /proc and setups the profile and /etc of the target system. To use it, setup /mnt
as described in the installation manual.
Then run nixos-enter
:
$ nixos-enter