LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

schroot

Run commands in managed chroot environments

TLDR

List available chroots
$ schroot --list
copy
Run command in specific chroot
$ schroot --chroot chroot_name command
copy
Run command with options in chroot
$ schroot --chroot chroot_name -- command command_options
copy
Run command in all chroots
$ schroot --all command
copy
Start interactive shell as specific user
$ schroot --chroot chroot_name --user user
copy
Begin new session
$ schroot --begin-session --chroot chroot_name
copy
Connect to existing session
$ schroot --run-session --chroot session_id
copy
End a session
$ schroot --end-session --chroot session_id
copy

SYNOPSIS

schroot [options] [command]

DESCRIPTION

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.

PARAMETERS

-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.

CONFIGURATION

/etc/schroot/schroot.conf

Main configuration file defining available chroot environments, their types, locations, and access permissions.
/etc/schroot/chroot.d/
Directory for individual chroot definition files, allowing modular configuration.
/etc/schroot/setup.d/
Directory containing setup scripts executed when sessions begin and end, handling mount points, networking, and environment preparation.

INSTALL

sudo apt install schroot
copy
sudo pacman -S schroot
copy
nix profile install nixpkgs#schroot
copy

CAVEATS

Requires proper chroot configuration. Sessions must be ended to release resources.

HISTORY

Developed for Debian as an improved chroot solution with better security and usability features.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid