xref: /original-bsd/usr.sbin/chroot/chroot.8 (revision 4aed304e)
1*4aed304eSbostic.\" Copyright (c) 1988, 1991, 1993
2*4aed304eSbostic.\"	The Regents of the University of California.  All rights reserved.
3bd3cebb8Sbostic.\"
4e68d402aStrent.\" %sccs.include.redist.man%
5bd3cebb8Sbostic.\"
6*4aed304eSbostic.\"     @(#)chroot.8	8.1 (Berkeley) 06/09/93
7bd3cebb8Sbostic.\"
813251ec2Scael.Dd
913251ec2Scael.Dt CHROOT 8
1013251ec2Scael.Os BSD 4.3
1113251ec2Scael.Sh NAME
1213251ec2Scael.Nm chroot
1313251ec2Scael.Nd change root directory
1413251ec2Scael.Sh SYNOPSIS
1513251ec2Scael.Nm chroot
1613251ec2Scael.Ar newroot
1713251ec2Scael.Op Ar command
1813251ec2Scael.Sh DESCRIPTION
19bd3cebb8SbosticThe
2013251ec2Scael.Nm chroot
21bd3cebb8Sbosticcommand changes its root directory to the supplied directory
2213251ec2Scael.Ar newroot
23bd3cebb8Sbosticand exec's
2413251ec2Scael.Ar command ,
2513251ec2Scaelif supplied, or an interactive copy of your shell.
2613251ec2Scael.Pp
27bd3cebb8SbosticNote,
2813251ec2Scael.Ar command
29bd3cebb8Sbosticor the shell are run as your real-user-id.
3013251ec2Scael.Sh ENVIRONMENT
3113251ec2ScaelThe following environment variable is referenced by
3213251ec2Scael.Nm chroot :
3313251ec2Scael.Bl -tag -width SHELL
3413251ec2Scael.It Ev SHELL
3513251ec2ScaelIf set,
3613251ec2Scaelthe string specified by
3713251ec2Scael.Ev SHELL
3813251ec2Scaelis interpreted as the name of
3913251ec2Scaelthe shell to exec.
4013251ec2ScaelIf the variable
4113251ec2Scael.Ev SHELL
4213251ec2Scaelis not set,
4313251ec2Scael.Pa /bin/sh
4413251ec2Scaelis used.
4513251ec2Scael.El
4613251ec2Scael.Sh SEE ALSO
4713251ec2Scael.Xr chdir 2 ,
4813251ec2Scael.Xr chroot 2 ,
4913251ec2Scael.Xr environ 7
5013251ec2Scael.Sh HISTORY
5113251ec2ScaelThe
52f1f57aedSbostic.Nm chroot
53f1f57aedSbosticutility first appeared in 4.4BSD.
54