Skip to content
E2B Docs
CLI

Create sandbox

You can create a sandbox and connect an interactive terminal to it.

e2b sandbox create <template>

For example, to create a sandbox from the base template:

e2b sandbox create base

This will:

  1. Create a new sandbox from the specified template
  2. Connect your terminal to the sandbox
  3. Keep the sandbox alive while you’re connected
  4. Automatically kill the sandbox when you exit the terminal

Once connected, you can inspect the sandbox filesystem and processes to debug or experiment, or use it as a dedicated environment for running agents instead of your local computer.

Was this page helpful?Suggest editsRaise issue