Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cd(1)

chroot(2)



  chroot(8)                           CLIX                           chroot(8)



  NAME

    chroot - Changes root directory for a command

  SYNOPSIS

    /etc/chroot newroot command

  DESCRIPTION

    The chroot command causes the given command to be executed relative to the
    newroot.  The meaning of any initial slashes (/) in the pathnames 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 chroot command to
    a file:

    chroot newroot command >x

    the chroot command will create the file x relative to the original root of
    the command, not the new one.  The newroot pathname 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.

    The chroot command can be run only by the superuser.

  EXAMPLES

    To change your root directory to be /usr/bin/ then execute the find
    command, enter the following:

    chroot /usr/bin find . -print


  CAUTIONS

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

  EXIT VALUES

    Upon successful completion, a value of 0 is returned.  Otherwise, a value
    of 1 is returned and errno is set to indicate the error.

  RELATED INFORMATION

    Commands: cd(1)

    Functions: chroot(2)




  2/94 - Intergraph Corporation                                              1




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026