ANSI, minor cleanups
[unix-history] / usr / src / usr.sbin / chroot / chroot.8
CommitLineData
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 19The
b42074ab 20.Nm chroot
a01ced3e 21command changes its root directory to the supplied directory
b42074ab 22.Ar newroot
a01ced3e 23and exec's
b42074ab
CL
24.Ar command ,
25if supplied, or an interactive copy of your shell.
26.Pp
a01ced3e 27Note,
b42074ab 28.Ar command
a01ced3e 29or the shell are run as your real-user-id.
b42074ab
CL
30.Sh ENVIRONMENT
31The following environment variable is referenced by
32.Nm chroot :
33.Bl -tag -width SHELL
34.It Ev SHELL
35If set,
36the string specified by
37.Ev SHELL
38is interpreted as the name of
39the shell to exec.
40If the variable
41.Ev SHELL
42is not set,
43.Pa /bin/sh
44is used.
45.El
46.Sh SEE ALSO
47.Xr chdir 2 ,
48.Xr chroot 2 ,
49.Xr environ 7
50.Sh HISTORY
51The
52.Nm
53command
54.Ud