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