# server.Server.runShell

- **Module:** server.Server
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/server.ts#L964
- **Page:** https://libtmux.org/en/ts/latest/reference/server-server-runshell/

```
server.Server.runShell(command: : string, options: : RunShellOptions) -> Promise<readonly string[]>
```

Run a shell command through tmux and return whatever it printed.

`signal` and `timeoutMs` bound this call's own wait; the tmux server owns
and runs `run-shell` itself, decoupled from this client, so neither one
stops the command - only this call's own promise settling early.

## Example

```ts
const lines = await server.runShell("echo hello");
lines[0]; // "hello"
```
