chroot.1 (896B)
- .\" Collection of Unix tools, comparable to coreutils
- .\" Copyright 2017-2023 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 args ...
- .Sh DESCRIPTION
- .Nm
- runs
- .Ar command
- in the root directory at
- .Ar newroot .
- If no
- .Ar command
- was given,
- .Nm
- instead runs
- .Lc $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 occured in
- .Nm
- .It 126
- .Ar command
- was found but couldn't be invoked.
- .It 127
- .Ar command
- wasn't found.
- .El
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact@hacktivis.me