nixos-enter man page
nixos-enter __ — run a command in a NixOS chroot environment This command runs a command in a NixOS chroot environment, that is, in a filesystem hierarchy previously prepared using nixos-install. This command accepts the following options: The path to the NixOS system you want to enter. It defaults to /mnt. The NixOS system configuration to use. It defaults to /nix/var/nix/profiles/system. You can enter a previous NixOS configuration by specifying a path such as /nix/var/nix/profiles/system-106-link. The bash command to execute. Interpret the remaining arguments as the program name and arguments to be invoked. The program is not executed in a shell. Start an interactive shell in the NixOS installation in /mnt: Run a shell command: Run a non-shell command: Eelco Dolstra Author Copyright © 2007-2018 Eelco DolstraSynopsis
nixos-enter [--root root] [--system system] [-c shell-command] [--help] [-- arguments]
Description
Options
Examples
# nixos-enter /mnt
# nixos-enter -c 'ls -l /; cat /proc/mounts'
# nixos-enter -- cat /proc/mounts
Author
Copyright
Info