chroot(8)chroot(8)Namechroot - change root directory for a command
/usr/bin/chroot newroot command
The program is executed relative to the new root. The meaning of any
initial slashes (/) in path names is changed for a command and any of
its children to newroot. Furthermore, the initial working directory is
The new root path name is always relative to the current root: even if
a is currently in effect, the newroot argument is relative to the cur‐
rent root of the running process.
This program is restricted to processes with appropriate privileges.
Use extreme caution when referencing special files in the new root file
The following example will create the file x relative to the original
root, not the new one.
% chroot newroot command >x
See Alsochdir(2), chroot(2)chroot(8)