about summary refs log tree commit diff
path: root/nixpkgs/nixos/doc/manual/manpages/nixos-enter.8
blob: 646f92199d62fd6c7b12b4be7be480c7d861edac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.Dd January 1, 1980
.Dt nixos-enter 8
.Os
.Sh NAME
.Nm nixos-enter
.Nd run a command in a NixOS chroot environment
.
.
.
.Sh SYNOPSIS
.Nm nixos-enter
.Op Fl -root Ar root
.Op Fl -system Ar system
.Op Fl -command | c Ar shell-command
.Op Fl -silent
.Op Fl -help
.Op Fl - Ar arguments ...
.
.
.
.Sh DESCRIPTION
This command runs a command in a NixOS chroot environment, that is, in a filesystem hierarchy previously prepared using
.Xr nixos-install 8 .
.
.
.
.Sh OPTIONS
.Bl -tag -width indent
.It Fl -root Ar root
The path to the NixOS system you want to enter. It defaults to
.Pa /mnt Ns
\&.
.It Fl -system Ar system
The NixOS system configuration to use. It defaults to
.Pa /nix/var/nix/profiles/system Ns
\&. You can enter a previous NixOS configuration by specifying a path such as
.Pa /nix/var/nix/profiles/system-106-link Ns
\&.
.
.It Fl -command Ar shell-command , Fl c Ar shell-command
The bash command to execute.
.
.It Fl -silent
Suppresses all output from the activation script of the target system.
.
.It Fl -
Interpret the remaining arguments as the program name and arguments to be invoked.
The program is not executed in a shell.
.El
.
.
.
.Sh EXAMPLES
.Bl -tag -width indent
.It Ic nixos-enter --root /mnt
Start an interactive shell in the NixOS installation in
.Pa /mnt Ns .
.
.It Ic nixos-enter -c 'ls -l /; cat /proc/mounts'
Run a shell command.
.
.It Ic nixos-enter -- cat /proc/mounts
Run a non-shell command.
.El
.
.
.
.Sh AUTHORS
.An -nosplit
.An Eelco Dolstra
and
.An the Nixpkgs/NixOS contributors