← 返回命令列表

Linux command

schroot 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

schroot --list

Example

schroot --chroot chroot_name command

Example

schroot --chroot chroot_name -- command command_options

Example

schroot --all command

Example

schroot --chroot chroot_name --user user

Begin

schroot --begin-session --chroot chroot_name

Connect

schroot --run-session --chroot session_id

End

schroot --end-session --chroot session_id

说明

schroot runs commands or starts interactive shells in different root directory environments. It provides more features and customization than basic chroot, including session management and user mapping. Configured via /etc/schroot/schroot.conf, it supports multiple chroot types and configurations.

参数

-l, --list
List available chroots.
-c _NAME_, --chroot _NAME_
Specify chroot environment.
-u _USER_, --user _USER_
Run as specified user.
-a, --all
Run in all available chroots.
--begin-session
Start new session.
--run-session
Connect to existing session.
--end-session
Terminate session.
-i, --info
Display detailed information about specified chroots.
-d _DIR_, --directory _DIR_
Change to directory inside the chroot before running command.
-p, --preserve-environment
Preserve the user's environment inside the chroot.
-q, --quiet
Show less output.
-v, --verbose
Show more output.

FAQ

What is the schroot command used for?

schroot runs commands or starts interactive shells in different root directory environments. It provides more features and customization than basic chroot, including session management and user mapping. Configured via /etc/schroot/schroot.conf, it supports multiple chroot types and configurations.

How do I run a basic schroot example?

Run `schroot --list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -l, --list do in schroot?

List available chroots.