> ## Documentation Index
> Fetch the complete documentation index at: https://opensandbox-oc-s-762ac928075c46d2828bcb22.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# oc shell

> Interactive terminal access

## `oc shell <id>`

Open an interactive terminal (PTY) session via WebSocket. [HTTP API →](/api-reference/pty/create)

<ParamField query="--shell" type="string" default="/bin/bash">
  Shell to use
</ParamField>

Terminal size is auto-detected and resize events are forwarded. Press `Ctrl+D` or type `exit` to disconnect. The PTY session is cleaned up automatically on exit.

```bash theme={null}
oc shell sb-abc123
oc shell sb-abc123 --shell /bin/zsh
```
