Commit | Line | Data |
---|---|---|
b42074ab | 1 | .\" Copyright (c) 1988, 1991 The Regents of the University of California. |
a01ced3e KB |
2 | .\" All rights reserved. |
3 | .\" | |
4a46eaab | 4 | .\" %sccs.include.redist.man% |
a01ced3e | 5 | .\" |
b42074ab | 6 | .\" @(#)chroot.8 5.3 (Berkeley) %G% |
a01ced3e | 7 | .\" |
b42074ab CL |
8 | .Dd |
9 | .Dt CHROOT 8 | |
10 | .Os BSD 4.3 | |
11 | .Sh NAME | |
12 | .Nm chroot | |
13 | .Nd change root directory | |
14 | .Sh SYNOPSIS | |
15 | .Nm chroot | |
16 | .Ar newroot | |
17 | .Op Ar command | |
18 | .Sh DESCRIPTION | |
a01ced3e | 19 | The |
b42074ab | 20 | .Nm chroot |
a01ced3e | 21 | command changes its root directory to the supplied directory |
b42074ab | 22 | .Ar newroot |
a01ced3e | 23 | and exec's |
b42074ab CL |
24 | .Ar command , |
25 | if supplied, or an interactive copy of your shell. | |
26 | .Pp | |
a01ced3e | 27 | Note, |
b42074ab | 28 | .Ar command |
a01ced3e | 29 | or the shell are run as your real-user-id. |
b42074ab CL |
30 | .Sh ENVIRONMENT |
31 | The following environment variable is referenced by | |
32 | .Nm chroot : | |
33 | .Bl -tag -width SHELL | |
34 | .It Ev SHELL | |
35 | If set, | |
36 | the string specified by | |
37 | .Ev SHELL | |
38 | is interpreted as the name of | |
39 | the shell to exec. | |
40 | If the variable | |
41 | .Ev SHELL | |
42 | is not set, | |
43 | .Pa /bin/sh | |
44 | is used. | |
45 | .El | |
46 | .Sh SEE ALSO | |
47 | .Xr chdir 2 , | |
48 | .Xr chroot 2 , | |
49 | .Xr environ 7 | |
50 | .Sh HISTORY | |
51 | The | |
52 | .Nm | |
53 | command | |
54 | .Ud |