chroot(1M) chroot(1M)
NAME
chroot - change root directory for a command
SYNOPSIS
/etc/chroot newroot command
DESCRIPTION
Execute command relative to the new root. Change initial
slashes (/) in path names to newroot for a command and any
of its children. Also, change the initial working directory
to newroot.
chroot newroot command > x
creates the file x relative to the original root, not the
new one.
Only the super-user can use this command.
The new root path name is always relative to the current
root: even if a chroot is currently in effect, the newroot
argument is relative to the current root of the running
process.
EXAMPLE
If you have a floppy-based Oreo system disk in /dev/floppy,
then:
mkdir /t
mount /dev/flop /t
chroot /t /bin/sh
leaves you running programs off of the floppy. To return to
your original shell, exit your shell.
FILES
/etc/chroot
SEE ALSO
chdir(2).
BUGS
Be very careful when referencing special files in the new
root file system.
Page 1 (last mod. 1/15/87)