chroot.1 (967B)
- .\" utils-std: Collection of commonly available Unix tools
- .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- .\" SPDX-License-Identifier: MPL-2.0
- .Dd 2023-08-04
- .Dt CHROOT 1
- .Os
- .Sh NAME
- .Nm chroot
- .Nd run in another root directory
- .Sh SYNOPSIS
- .Nm
- .Ar newroot
- .Op Ar command Op Ar argument...
- .Sh DESCRIPTION
- .Nm
- runs
- .Ar command
- in the root directory at
- .Ar newroot .
- If no
- .Ar command
- was given,
- .Nm
- instead runs
- .Ql $SHELL -i
- with
- .Ev SHELL
- itself defaulting to
- .Pa /bin/sh .
- .Sh EXIT STATUS
- If
- .Ar command
- is invoked, the exit status of
- .Nm
- shall be the exit status of
- .Ar command ;
- Otherwise, the
- .Nm
- utility shall exit with one of the following values:
- .Bl -tag -width Ds
- .It 125
- An error occurred in
- .Nm
- .It 126
- .Ar command
- was found but couldn't be invoked.
- .It 127
- .Ar command
- wasn't found.
- .El
- .Sh HISTORY
- The
- .Nm
- utility first appeared in
- .Bx 4.3 Reno .
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me