chroot - run a shell with a different filesystem root
# chroot <path> [program] [-o options]
This program uses the chroot
(2) syscall to switch into a
different filesystem root and spawn a shell inside it.
It runs the given program (by default, /bin/Shell
) inside the new root.
Mount options can be given in the same format as for mount
(8).
# chroot /var/chroot
# pwd
/
# chroot -u 200:200 /var/chroot
$ id
uid=200(nona) gid=200(n/a)