container_exec
Run commands inside a running WSL container to manage processes, install software, or troubleshoot.
Instructions
Execute a command inside a running WSL container.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Environment variables (key=value pairs) | |
| tty | No | Allocate a pseudo-TTY | |
| user | No | User to run the command as (name|uid|uid:gid) | |
| detach | No | Run in detached mode | |
| command | Yes | Command to run inside the container | |
| workdir | No | Working directory inside the container | |
| commandArgs | No | Arguments for the command | |
| containerId | Yes | Container ID or name | |
| interactive | No | Keep stdin open |