chroot(1M)


chroot -- change root directory for a command

Synopsis

/usr/sbin/chroot newroot command

Description

chroot causes the given command to be executed relative to the new root. The meaning of any initial slashes (/) in the path names is changed for the command and any of its child processes to newroot. Furthermore, upon execution, the initial working directory is newroot.

Notice, however, that if you redirect the output of the command to a file:

chroot newroot command > x

will create the file x relative to the original root of the command, not the new one.

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.

This command can be run only by a privileged user.

References

cd(1), chroot(2)

Notices

One should exercise extreme caution when referencing device files in the new root file system.

When using chroot, do not exec a command that uses shared libraries. This will result in killing your process.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004