2016-01-05 21:07:36 +05:30
|
|
|
# chroot
|
|
|
|
|
|
|
|
> Run command or interactive shell with special root directory.
|
2021-04-01 17:54:26 +02:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/chroot>.
|
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
|
|
|
|
2024-01-24 04:22:18 -03:00
|
|
|
- Use a specific user and group:
|
2016-01-05 21:07:36 +05:30
|
|
|
|
2024-01-24 04:22:18 -03:00
|
|
|
`chroot --userspec={{username_or_id:group_name_or_id}}`
|