chroot
Change the root directory to run commands in an isolated filesystem environment for testing software.
Instructions
Plan or run a command inside a changed root directory. Destructive: isolates command execution to a new filesystem root. May require elevated privileges. Use --dry_run to preview. Requires --allow_chroot for execution; fails safely otherwise. Use to test software in isolated environments. Not for simple directory changes — use 'cd' or path arguments on other commands. See also 'runcon'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| allow_chroot | No | Allow a real chroot execution where supported. | |
| command_args | No | Command and arguments to run inside the root. | |
| dry_run | No | Report without running the command. | |
| max_output_bytes | No | Maximum captured stdout/stderr bytes each. | |
| root | Yes | Directory to use as the new root. | |
| timeout | No | Safety timeout for the command. |