nixos-enter(8)
π nixos-enter(8) β from the System Manager's Manual bestie
okay so picture this: you've got a whole NixOS system sitting there in a directory, and you just want to step inside it and vibe. that's what this page is about. no cap.
β¨ NAME β¨
nixos-enter β run a command in a NixOS chroot environment π«Ά
π¦ SYNOPSIS π¦
nixos-enter [--root root] [--system system]
[--command | -c shell-command] [--silent] [--help]
[-- arguments ...]
πΈ DESCRIPTION πΈ
So nixos-enter runs a command inside a NixOS chroot environment β like, literally inside a filesystem hierarchy that you already prepared earlier using nixos-install(8). it's giving "teleport into your other self" energy. iconic.
π OPTIONS π
--root rootβ the path to the NixOS system you wanna enter, bestie. defaults to/mnt. (yes, the classic.)--system systemβ which NixOS system configuration to use. defaults to/nix/var/nix/profiles/system. and here's the cute part: you can time-travel back to a previous NixOS configuration by specifying a path like/nix/var/nix/profiles/system-106-link. lowkey obsessed.--command shell-command,-c shell-commandβ the bash command to execute. that's it, that's the whole vibe.--silentβ suppresses all output from the activation script of the target system. shhh π€« main character energy is quiet energy.--β interpret the remaining arguments as the program name and arguments to be invoked. important: the program is not executed in a shell. fr fr, no shell involved.
also --help is in the synopsis up there π so go off if you need it.
π EXAMPLES π
nixos-enter --root /mntβ start an interactive shell in the NixOS installation in/mnt. slay, you're in. πnixos-enter -c 'ls -l /; cat /proc/mounts'β run a shell command. two commands, one string, easy.nixos-enter -- cat /proc/mountsβ run a non-shell command. no shell, just straight to the program. periodt.
π AUTHORS π
Eelco Dolstra and the Nixpkgs/NixOS contributors β absolute legends, all of them π
okay that's genuinely the whole page, you ate that. go enter some chroots bestie π¦β¨
this one's from the Debian manual, dated January 1, 1980 β yes really, that date, it's iconic β and it's the nixos-enter(8) page. mwah π
π¦ where this page comes from
- nixos 26.05: nixos-enter
- nixpkgs unstable: nixos-enter
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms