commands.run() method.
Commands
Running commands in sandbox
You can run terminal commands inside the sandbox using the
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
commands.run() method.
import { Sandbox } from 'e2b'
const sandbox = await Sandbox.create()
const result = await sandbox.commands.run('ls -l')
console.log(result)
from e2b import Sandbox
sandbox = Sandbox.create()
result = sandbox.commands.run('ls -l')
print(result)
Was this page helpful?