# tmux.Server.RunShell

- **Module:** tmux.Server
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/server_exec.go#L153
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-server-runshell/

```
tmux.Server.RunShell(ctx: context.Context, request: RunShellRequest) -> ([]string, error)
```

RunShell executes a shell command through tmux and returns an owned stdout slice. A background request returns nil after tmux accepts the job. Unsupported optional flags follow [UnsupportedPolicy]. A completed stderr result is an error; context cancellation can be observed with [errors.Is] but does not establish that tmux did not start the job.
