Integrated Terminal
Access command-line tools without leaving your editor
Terminal Integration in Zed
One of Zed's most useful features is its built-in terminal emulator. You can run shells, tasks, and interactive tools without switching applications—while keeping deep links back into your project files.
The integrated terminal supports:
- Full shell functionality (Bash, Zsh, Fish, PowerShell, and more)
- Multiple terminal instances, tabs, and splits
- Panel docking on the bottom, left, or right—or a center-pane terminal tab
- Path hyperlinks, search, Tasks integration, and AI Inline Assistant help
- Python virtualenv detection and custom working directories
Opening the Terminal
There are several ways to access the terminal in Zed:
| Action | macOS | Linux/Windows |
|---|---|---|
| Toggle terminal panel | Ctrl` | Ctrl` |
| Open new terminal | Ctrl~ | Ctrl~ |
| Open terminal in center | Command Palette → workspace: new center terminal |
Command Palette → workspace: new center terminal |
-
Keyboard Shortcut
Press Ctrl` (backtick) on every platform to toggle the terminal panel. This is the quickest way to show or hide it.
-
Command Palette
Open the Command Palette and run
terminal panel: toggleorworkspace: new terminal. -
Menu / status bar
Use the Terminal entry from the UI, or the terminal button in the status bar (unless you hide it in settings).
Terminal Panel vs Center Terminal
- Terminal Panel: docked at the bottom by default (also left or right). Toggle with Ctrl`.
- Center Pane: opens as a regular tab alongside your files via
workspace: new center terminal.
Resize a docked terminal by dragging the divider. Prefer a center terminal when you want the shell to feel like a full editor tab instead of a tool panel.
Terminal Basics
Working Directory
Control where new terminals start with the terminal.working_directory setting:
| Value | Behavior |
|---|---|
current_file_directory |
Current file's directory, then project directory, then first workspace project |
current_project_directory |
Current file's project directory (default) |
first_project_directory |
First project in the workspace |
always_home |
Always your home directory |
{ "always": { "directory": "~/projects" } } |
Always a specific directory |
Shell Selection
By default, Zed uses your system's default shell. Configure a custom shell in
settings.json:
json{ "terminal": { "shell": { "program": "/bin/zsh" } } }
Or pass arguments:
json{ "terminal": { "shell": { "with_arguments": { "program": "/bin/bash", "args": ["--login"] } } } }
- Bash, Zsh, Fish, and other Unix shells
- PowerShell or other shells on Windows
Zed's terminal inherits your shell configuration files (such as .bashrc,
.zshrc, or config.fish), keeping the experience consistent with a
standalone terminal.
Multiple Terminal Instances
Zed lets you create and manage multiple terminal instances for different tasks:
Creating New Terminals
| Action | macOS | Linux/Windows |
|---|---|---|
| New terminal (in panel) | ⌘N | CtrlN |
| Split terminal | ⌘D | CtrlShift5 |
- Focus the terminal panel first, then press New / Split
- Each terminal appears as a tab in the panel
- You can also use the
+control in the panel header
Switching Between Terminals
- Click terminal tabs in the panel
- Use tab navigation shortcuts while the panel is focused
- Keep one terminal for the dev server, one for tests, and one for git or package commands
Use different terminals for different contexts: one for running a development server, another for running tests, and a third for git operations.
Closing Terminals
- Click the close control on a terminal tab
- Type
exitin the shell - Close the tab with your usual close-tab binding when the terminal is focused
Terminal Features
Text Selection and Copying
Working with text in the terminal:
| Action | macOS | Linux/Windows |
|---|---|---|
| Copy | ⌘C | CtrlShiftC |
| Paste | ⌘V | CtrlShiftV |
- Click and drag to select text; double-click a word; triple-click a line
- Enable
terminal.copy_on_selectto copy automatically on selection - Use
terminal.keep_selection_on_copyto control whether selection clears after copy
Scrolling and Search
| Action | macOS | Linux/Windows |
|---|---|---|
| Search in terminal | ⌘F | CtrlShiftF |
| Clear terminal | ⌘K | CtrlShiftL |
| Scroll page up | ShiftPageUp or ⌘↑ | ShiftPageUp |
| Scroll page down | ShiftPageDown or ⌘↓ | ShiftPageDown |
Terminal search opens the same search bar used in the editor. Toggle vi-style navigation with CtrlShiftSpace.
Path Hyperlinks
Zed detects file paths in terminal output and makes them clickable:
| Action | macOS | Linux/Windows |
|---|---|---|
| Open path hyperlink | ⌘Click | CtrlClick |
src/main.rs:42opens at line 42src/main.rs:42:10opens at line 42, column 10- Python-style
File "script.py", line 10tracebacks are recognized
Command History
- Press ↑ and ↓ to navigate shell history
- Use your shell's reverse search (commonly CtrlR) when supported
Terminal Configuration
Terminal Settings
Customize the terminal in Settings or directly in settings.json:
- Press ⌘, / Ctrl, to open Settings
- Search for
terminalto find relevant options
Common settings include fonts, shell, dock position, env vars, and venv detection:
json{ "terminal": { "dock": "bottom", "font_family": "JetBrains Mono", "font_size": 14, "line_height": "comfortable", "cursor_shape": "bar", "blinking": "on", "working_directory": "current_project_directory", "env": { "EDITOR": "zed --wait" }, "detect_venv": { "on": { "directories": [".venv", "venv"], "activate_script": "default" } } } }
Dock Position
Set terminal.dock to "bottom" (default), "left", or
"right". You can also set default_width / default_height,
hide the status-bar button with "button": false, or enable breadcrumb toolbar titles.
Python Virtual Environment Detection
By default, Zed can search for .env, env, .venv, and
venv directories and activate them when a terminal opens. Customize directories and
activate_script (default, csh, fish,
nushell), or disable detection with "detect_venv": "off".
Working with the Terminal
Running Development Tasks
The terminal is perfect for everyday development commands:
- Start development servers:
npm run dev - Run tests:
npm testorpytest - Build applications:
npm run buildorcargo build - Run database migrations:
rails db:migrate
Tasks Integration
Zed's task system runs in the terminal. After a task finishes, you can rerun the last task from a terminal:
| Action | macOS | Linux/Windows |
|---|---|---|
| Rerun last task | ⌘⌥R | CtrlShiftR or AltT |
Keep a terminal instance open with your development server while you code so you can see feedback immediately as you make changes.
AI Inline Assistant in the Terminal
Get help explaining errors, suggesting commands, or troubleshooting directly in the terminal:
| Action | macOS | Linux/Windows |
|---|---|---|
| Inline Assistant | CtrlEnter | CtrlEnter or CtrlI |
Agents in the Agent Panel can also run terminal commands as part of their workflow.
File Operations
The terminal provides full access to file system operations:
- Create files and directories:
mkdir -p src/components - Copy or move files:
cp -r old_dir/ new_dir/ - Search file contents:
rg "searchterm" - Change file permissions:
chmod +x ./scripts/deploy.sh
Terminal in Collaborative Sessions
When collaborating in Zed, keep these terminal realities in mind:
Local Terminals During Collaboration
- Your terminal still runs on your machine with your local environment
- Following a collaborator in the editor does not follow their terminal the same way
- For demos or debugging together, use screen sharing so others can see your shell session
Screen sharing is especially useful for teaching command-line workflows or troubleshooting environment-specific issues with teammates.
Practical Tips
- Share only what you need—remember project sharing already exposes project files
- Avoid pasting secrets into a shared or screen-shared terminal
- Use a dedicated terminal tab for collaborative demos so you can close it cleanly afterward
Advanced Terminal Usage
Environment Variables
Add environment variables to all terminal sessions via settings, or export them in the shell:
json{ "terminal": { "env": { "EDITOR": "zed --wait", "MY_VAR": "value", "PATH": "/custom/path:$PATH" } } }
Running Background Processes
Run processes in the background with the & operator:
bashnpm run watch &
Use the fg command to bring background processes to the foreground,
and jobs to list them.
Interactive Programs
Zed's terminal fully supports interactive programs:
- Command-line editors (vim, nano)
- Interactive REPLs (Node.js, Python, Ruby)
- Database clients (mysql, psql)
- Interactive debugging tools and TUIs (htop, lazygit, and similar)
For TUI-heavy workflows, try "line_height": "standard" so box-drawing characters
align better. Enable alternate_scroll when apps like vim or less should receive
arrow keys from mouse scroll.
What's Next?
With a solid understanding of Zed's terminal capabilities, you're ready to learn about Git integration, which combines seamlessly with the terminal for a complete version control workflow.