mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 19:35:24 +02:00
13 lines
364 B
Markdown
13 lines
364 B
Markdown
![]() |
# chroot
|
||
|
|
||
|
> 使用指定的根目录运行命令或交互式 shell。
|
||
|
> 更多信息:<https://www.gnu.org/software/coreutils/manual/html_node/chroot-invocation.html>.
|
||
|
|
||
|
- 以新的根目录,运行命令:
|
||
|
|
||
|
`sudo chroot {{路径/到/新/根目录}} {{命令}}`
|
||
|
|
||
|
- 使用指定的用户和组:
|
||
|
|
||
|
`sudo chroot --userspec {{用户名或用户id:组名或组id}}`
|