1.\" Copyright (c) 1988, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)chroot.8 8.1 (Berkeley) 06/09/93 7.\" 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 19The 20.Nm chroot 21command changes its root directory to the supplied directory 22.Ar newroot 23and exec's 24.Ar command , 25if supplied, or an interactive copy of your shell. 26.Pp 27Note, 28.Ar command 29or the shell are run as your real-user-id. 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 chroot 53utility first appeared in 4.4BSD. 54