# Sandbox terminal and commands

Open an interactive shell in a running sandbox, or run one command and stream its output.

## Run a command

Exec runs one command as bash -lc in /workspace, or in the directory you name, and streams stdout and stderr as they arrive. It ends with the exit code. If your client disconnects, the command is cancelled. Runzivo does not log commands or their output, and does not add them to the activity log.

## Open a terminal

The terminal is a shell in the sandbox, reached through Runzivo; nothing connects to the VM directly. Use rzv sandboxes ssh \<sandbox-id\>, or the terminal on the sandbox page in the portal.

A shell starts at 80 by 24 and follows your window size. If the connection drops, the shell ends; open a new terminal to continue. Files in /workspace stay.

## Limits and close reasons

Each sandbox runs a limited number of commands and terminals at once, and an idle terminal closes. When a terminal closes, rzv sandboxes ssh and the portal say why.

[See session limits](https://runzivo.dev/docs/sandboxes-limits/)

[Read the close codes in the exec and terminal API reference](https://runzivo.dev/docs/sandboxes-api-exec/)

On this page and page tools
