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