s6-linux-utils: the s6-pivotchroot program
Description: s6-linux-utils: the pivotchroot program
Keywords: s6 linux administration root utilities pivot_root chroot pivotchroot

s6-linux-utils
Software
skarnet.org

# The `s6-pivotchroot` program

`s6-pivotchroot` performs a pivot_root system call, then changes root to the new root filesystem and executes a program.

## Interface

         s6-pivotchroot newroot putold prog...

- `s6-pivotchroot` sets the root filesystem to newroot, which must be a mounted filesystem entry point. The old root filesystem will be available under putold (relative to the old root).
- `s6-pivotchroot` changes directory to the new root, performs a chroot system call to the new root, and executes prog with its arguments. prog is searched under the new root.