> ## Documentation Index
> Fetch the complete documentation index at: https://a5eb32f-docs-2.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://a5eb32f-docs-2.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://a5eb32f-docs-2.manicule.dev/api/mcp.
> Every agent surface: https://a5eb32f-docs-2.manicule.dev/.well-known/llms-manifest.json

# Run Commands in the Desktop Terminal (/desktop/terminal)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 739 · updated: 2026-11-25 -->
Related: [Work in BhaiCode Desktop](/desktop/overview.md), [Delegate a Task in Agentic Canvas](/desktop/agentic-mode.md), [Edit Code and Ask About a Selection](/desktop/code-editor.md), [Review and Roll Back Agent Changes](/desktop/diff-viewer.md), [Review and Approve Agent Actions](/desktop/transparency.md), [Keyboard Shortcuts](/desktop/shortcuts.md)

> Run your system shell in Desktop and keep dev servers separate from short checks.

Use the integrated terminal to run project commands without leaving BhaiCode Desktop. It runs your system shell through a pseudo-terminal (PTY), so the syntax and programs available depend on your shell. Give long-running processes their own tab so you can still run tests or inspect output elsewhere.

## Check which shell you're using

Desktop detects and opens your default system shell. The terminal display uses hardware-accelerated xterm.js, while the compiled Rust core uses portable-pty to manage the shell process.

| Platform | Shell examples                                                                              |
| -------- | ------------------------------------------------------------------------------------------- |
| Windows  | PowerShell (`pwsh.exe` or `powershell.exe`), Command Prompt (`cmd.exe`), or WSL (`wsl.exe`) |
| Linux    | `bash`, `zsh`, or a custom login shell                                                      |
| macOS    | `/bin/zsh`, `/bin/bash`, or `fish`                                                          |

The entries describe shell detection, not installer availability. Windows x64 is the only published Desktop build; see [installation](/getting-started/installation) for platform status. Check which shell opened before copying a command that depends on its syntax. A PowerShell command may need different quoting in Command Prompt or WSL.

## Separate servers from short commands

<Steps>
<Step title="Give the server a background tab">Open a separate terminal tab and start the process your project needs, such as `npm run dev`, `cargo watch`, or `docker compose up`. Leave that tab running while you continue working or talking to agents.</Step>

<Step title="Open a second pane for checks">Press `Ctrl + Shift + 5` on Windows or Linux (`Cmd + D` on macOS) to split the terminal into side-by-side panes. Use the other pane for short commands, such as a test or a linter run, while the server continues writing to its own terminal.</Step>

<Step title="Return to the server output when needed">Open the server tab if the app stops responding or a build fails. Keeping that output separate lets you inspect the server log without mixing it with output from tests.</Step>
</Steps>

## Read command output

The terminal uses OSC 133 shell integration to mark individual command blocks and display execution times and exit status codes. Use the block boundaries to match an error to the command that produced it. If a command exits unexpectedly, check its status and output before rerunning it.

For example, if you run a build and then a test in the same pane, inspect each command block separately. The last exit status tells you about the test, not whether the build succeeded.

## Next

* [Review commands the agent asks to run](/desktop/transparency)
* [Find Desktop keyboard shortcuts](/desktop/shortcuts)
