run_command
Execute a bash command in a WSL distribution as the default unprivileged user, returning stdout, stderr, and exit code. Supports pipes, redirections, and multi-line scripts without sudo.
Instructions
Execute a shell command inside a WSL distribution as the default (unprivileged) user. Returns stdout, stderr, and the exit code. Do NOT include 'sudo' in the command — it will hang waiting for a password that cannot be supplied. For operations that require root access use run_privileged_command instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| distro | No | Name of the WSL distribution to run the command in (e.g. 'Ubuntu', 'Debian'). Defaults to the system default distribution. | |
| command | Yes | The bash command to execute (passed to `bash -c`). Must not contain 'sudo'. Complex commands with pipes, redirections, and multi-line scripts are all supported. | |
| timeout_ms | No | Maximum execution time in milliseconds before the command is killed. Defaults to 30000 (30 seconds). Increase for long-running operations. |