2016-01-05 15:37:36 +00:00
|
|
|
# chroot
|
|
|
|
|
|
|
|
> Run command or interactive shell with special root directory.
|
2021-03-30 14:50:36 +01:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/chroot-invocation.html>.
|
2016-01-05 15:37:36 +00:00
|
|
|
|
2016-01-28 11:41:00 +00:00
|
|
|
- Run command as new root directory:
|
2016-01-05 15:37:36 +00:00
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`chroot {{path/to/new/root}} {{command}}`
|
2016-01-05 15:37:36 +00:00
|
|
|
|
2016-01-28 11:41:00 +00:00
|
|
|
- Specify user and group (ID or name) to use:
|
2016-01-05 15:37:36 +00:00
|
|
|
|
2016-03-31 09:32:28 +01:00
|
|
|
`chroot --userspec={{user:group}}`
|