mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-07 03:57:13 +00:00
Update cheatsheets
This commit is contained in:
@@ -8,10 +8,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Run command or interactive shell with special root directory.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/chroot-invocation.html>.
|
||||
|
||||
- Run `$SHELL` in the new root directory:
|
||||
|
||||
`sudo chroot {{path/to/new_root}}`
|
||||
|
||||
- Run command as new root directory:
|
||||
|
||||
`sudo chroot {{path/to/new_root}} {{command}}`
|
||||
|
||||
- Use a specific user and group:
|
||||
|
||||
`sudo chroot --userspec {{username_or_id:group_name_or_id}}`
|
||||
`sudo chroot --userspec {{username_or_id}}:{{group_name_or_id}} {{path/to/new_root}}`
|
||||
|
||||
Reference in New Issue
Block a user