The full guide
Terminal, step by step
Claude Code runs in any terminal, but two need no setup at all: Ghostty and Kitty. In both, Shift+Enter starts a new line and Claude Code sends desktop notifications when it needs you; iTerm2 does the same once you turn on its alert settings. WezTerm, Warp and Windows Terminal 1.25 or later handle Shift+Enter too but need the terminal bell or a notification hook; VS Code, Cursor and Zed need /terminal-setup once. In any terminal, Ctrl+J or \ then Enter also makes a new line.
Open Claude Code in a terminal
Claude Code is a terminal program: there is no window to open, you start it inside a terminal, in the folder you want it to work on. Open one: on macOS press Cmd+Space, type Terminal and press Enter; on most Linux distributions press Ctrl+Alt+T; on Windows press Win+X and pick Terminal or PowerShell.
- 1
Go to your project
- 2
Start Claude Code and sign in on first run
If the shell says command not found: claude, it is not installed or not on your PATH yet: how to install Claude Code. Type /help for commands, Esc to interrupt, and exit to leave. To skip the terminal entirely, Anthropic's desktop app runs Claude Code in a window of its own.
The best terminal for Claude Code: what each one supports
| Terminal | Runs on | Shift+Enter | Notifications |
|---|---|---|---|
| Ghostty | macOS, Linux | yes | yes |
| Kitty | macOS, Linux | yes | yes |
| iTerm2 | macOS | yes | yes, after its alert settings |
| WezTerm | macOS, Linux, Windows | yes | bell or hook |
| Warp | macOS, Linux, Windows | yes | bell or hook |
| Apple Terminal | macOS | not in Anthropic's list — use Ctrl+J | bell or hook |
| Windows Terminal | Windows | 1.25 and later; before, use Ctrl+J | bell or hook |
| Alacritty | macOS, Linux, Windows | 0.16 and later; before, after setup | bell or hook |
| VS Code, Cursor, Zed | in the editor | after setup | bell or hook |
| GNOME Terminal, JetBrains IDEs | Linux; in the IDE | no — use Ctrl+J | bell or hook |
| Caprock app | macOS, Windows, Linux | yes | its own, for permission prompts |
/terminal-setup once, below. The Caprock row is from Caprock's own source, checked 18 November 2026. Shift+Enter needs Claude Code 2.1.269 or later in Alacritty 0.16 and other terminals that speak the kitty keyboard protocol, such as foot. The choice comes down to two things Claude Code does all day: you write prompts of several lines, and it stops to ask you something while you are in another window. A terminal that handles both without setup is the one with the least friction; the rest get there with the steps below.
Shift+Enter for a new line
Shift+Enter works with no setup in Ghostty, Kitty, iTerm2, WezTerm, Warp and Windows Terminal 1.25 or later. In VS Code, Cursor, Devin Desktop, Zed and Alacritty before 0.16 it works after /terminal-setup, next. In GNOME Terminal, JetBrains IDEs and Windows Terminal before 1.25 it is not available: use Ctrl+J, or \ then Enter. Inside tmux it also needs the tmux lines further down. You can rebind the keys with the chat:newline and chat:submit keybindings.
What /terminal-setup does in Claude Code
/terminal-setup is a command you type inside Claude Code, once per terminal. In the terminals that need it, it writes a Shift+Enter key binding into the terminal's own configuration file, so Shift+Enter starts a new line instead of sending the prompt:
/terminal-setup
- Terminals that need it: VS Code, Cursor, Devin Desktop, Zed and Alacritty before 0.16.
- Terminals that do not: Ghostty, Kitty, iTerm2, WezTerm, Warp and Windows Terminal 1.25 or later; Alacritty 0.16 or later and foot with Claude Code 2.1.269 or later.
- Where it cannot help: GNOME Terminal, JetBrains IDEs and Windows Terminal before 1.25. Use Ctrl+J there.
- Run it in the terminal itself, not inside tmux or screen: it writes to the host terminal's configuration.
- It keeps what you have. Existing bindings stay. The first run prints a line such as "Installed VSCode terminal Shift+Enter key binding"; "already configured" means nothing changed.
It changes other settings too, and in Apple Terminal and iTerm2 only these:
- VS Code, Cursor, Devin Desktop: sets
terminal.integrated.gpuAccelerationto"off", against garbled text, and the mouse wheel's scroll sensitivity for full-screen mode. Set the first back to"auto"and reload the window to undo it. - Zed: merges the binding into
keymap.json, backing the file up first when it already holds bindings; if it cannot read or verify the file, it leaves it alone and prints the block to add yourself. - Apple Terminal: turns on "Use Option as Meta Key" and turns off the audible bell. Claude Code's first-run setup prompt, if you accept it, runs it for you.
- iTerm2: lets terminal apps reach the clipboard, so
/copyworks; restart iTerm2 afterwards.
Option as Meta on a Mac
Claude Code's Alt shortcuts need the Option key to send Meta:
- Apple Terminal: Settings → Profiles → Keyboard → "Use Option as Meta Key".
/terminal-setupsets it for you and turns off the audible bell. - iTerm2: Settings → Profiles → Keys → General, set Left and Right Option to "Esc+".
- VS Code:
"terminal.integrated.macOptionIsMeta": true.
Notifications when Claude needs you
Ghostty and Kitty show a desktop notification with no setup. iTerm2 shows it once you turn on Settings → Profiles → Terminal → "Notification Center Alerts" → "Filter Alerts" → "Send escape sequence-generated alerts". Over SSH, set preferredNotifChannel to "ghostty", "kitty" or "iterm2", your local terminal, on the machine that runs Claude Code, and the notification reaches your own machine. In other terminals Claude Code sends nothing by default (Apple Terminal gets at most a silent bell), so pick the terminal bell or a hook in ~/.claude/settings.json:
{ "preferredNotifChannel": "terminal_bell" }
In Apple Terminal also turn on Settings → Profiles → Advanced → "Audible bell" to hear it. A Notification hook can run any command as well, such as a system notification or a sound.
Claude Code in tmux
Add three lines to ~/.tmux.conf and reload it with tmux source-file ~/.tmux.conf. Passthrough lets notifications reach the outer terminal; the two extended-keys lines make Shift+Enter work:
set -g allow-passthrough on set -s extended-keys on set -as terminal-features 'xterm*:extkeys'
Then detach, attach again and restart Claude Code. For notifications also set preferredNotifChannel to "ghostty", "kitty" or "iterm2", the outer terminal; a pane in a window you are not viewing sends none. Anthropic's sample has a fourth line, set -g focus-events on, which it lists for images drawn by a mod.
The best Windows terminal for Claude Code
Use Windows Terminal: it is free and MIT-licensed, Shift+Enter starts a new line with no setup in version 1.25 or later (the stable release since October 2026; in an older one use Ctrl+J), and notifications come once you turn on the terminal bell or add a Notification hook, as above. WezTerm, Warp, Alacritty and the Caprock app run on Windows too. Leaving Warp: Warp alternatives.
Claude Code runs natively on Windows 10 1809 or later, in PowerShell or CMD, and in WSL. Git for Windows is optional and gives Claude Code Git Bash for its shell tool, otherwise it uses PowerShell. If Backspace deletes a whole word, set CLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0. Install steps: how to install Claude Code.
Flicker, themes and long pastes
- Flicker:
/tui fullscreenorCLAUDE_CODE_NO_FLICKER=1switches to full-screen rendering. - Theme:
/theme; "Auto" follows the terminal's light or dark background. - Vim keys:
/config→ Editor mode, or"editorMode": "vim". - Pastes over 800 characters or three lines collapse to one line such as "[Pasted text #1 +120 lines]". The VS Code terminal can drop characters from a very large paste.
- Status line: a row of your choice under the prompt — setting up the status line.
Caprock: a terminal for many sessions
With several sessions open, the terminal stops being the problem; finding the one that is waiting on you is. Anthropic's own desktop app is a window for one agent, free with a plan. Caprock is a free desktop app for macOS, Windows and Linux built on the record of every agent on the machine — the sessions it did not start included, how close each subscription is to its limit, each pull request's CI state and cost — and its terminal is how you live with that record.
- A tab per session. New agent starts Claude Code, Codex, OpenCode, Gemini CLI, Cursor's CLI, Grok Build or Hermes Agent in a real terminal tab of its project, beside plain shells (⌘T). ⌘E and ⇧⌘E split a tab, up to four panes. Tabs come back when you reopen the app; closing one ends an idle agent, its conversation saved, and asks about one still working.
- The keys Claude Code needs. Shift+Enter, Option+Enter and Ctrl+J add a new line. ⌘F finds in the terminal; drop a file from Finder, Explorer or your file manager and its quoted path is typed at the prompt.
- Scrolled up stays put. New output never moves what you are reading; a "↓ N new lines" pill takes you back down.
- What is waiting first. Sessions stopped on a prompt or waiting for your answer lead the sidebar, ⌘J jumps to the next, and the Dock badge counts them.
- The look. Settings → Terminal: eleven colour palettes or Match app, the font, size, line height and cursor. The defaults match the JetBrains IDE terminal: JetBrains Mono, 13 px, line height 1.2.
It also works beside the terminal you already use:
- Open in terminal: a session's Open in … button opens it in your own terminal — Ghostty, iTerm2, WezTerm, kitty, Warp or Terminal.app on macOS; Ghostty, GNOME Terminal, Konsole, kitty, WezTerm, Alacritty or xterm on Linux; Windows Terminal, PowerShell or cmd on Windows.
- Sessions from any terminal appear in the app with their cost; it types only into the sessions it started.
- In every terminal:
caprock statusline installputs the model, context, session cost and plan-limit windows under the prompt, and never replaces a status line you already have.
Free, open source; nothing leaves your machine unless you switch on a phone or an alert. Install Caprock.
Questions people ask
- How do I open Claude Code in the terminal?
- Open a terminal (Terminal on macOS, Ctrl+Alt+T on most Linux distributions, Windows Terminal or PowerShell on Windows), cd into your project and type claude. The first run asks you to sign in.
- What is the best terminal for Claude Code?
- Ghostty or Kitty if you want no setup: Shift+Enter and desktop notifications work out of the box. iTerm2, macOS only, needs its alert settings turned on for notifications. On Windows, Windows Terminal, with the terminal bell or a notification hook.
- What does /terminal-setup do in Claude Code?
- In VS Code, Cursor, Devin Desktop, Zed and Alacritty before 0.16 it writes a Shift+Enter key binding into the terminal's configuration, so Shift+Enter starts a new line. Run it once there; Ghostty, Kitty, iTerm2, WezTerm, Warp and Windows Terminal 1.25 or later do not. Run it outside tmux.
- How do I make Shift+Enter add a new line in Claude Code?
- It works with no setup in Ghostty, Kitty, iTerm2, WezTerm, Warp and Windows Terminal 1.25 or later. In VS Code, Cursor, Zed and Alacritty before 0.16 run /terminal-setup once. Ctrl+J works everywhere.
- Does Claude Code work in tmux?
- Yes. Set allow-passthrough on and extended-keys on, and add the extkeys terminal feature in ~/.tmux.conf, then detach, attach again and restart Claude Code, so Shift+Enter works. For notifications also set preferredNotifChannel to ghostty, kitty or iterm2, your outer terminal.
- How do I get notified when Claude Code needs input?
- Ghostty and Kitty show desktop notifications with no setup, and iTerm2 once you turn on its alert settings. Elsewhere set preferredNotifChannel to terminal_bell, or add a Notification hook that runs a command.
- Does Claude Code work in Windows Terminal?
- Yes. Claude Code runs natively in PowerShell or CMD on Windows 10 1809 or later, and Shift+Enter works without setup in Windows Terminal 1.25 or later.
Sources
- Claude Code docs — Terminal guide for new users, read 18 November 2026
- Claude Code docs — Configure your terminal for Claude Code, read 18 November 2026
- Claude Code docs — Interactive mode, read 18 November 2026
- Claude Code docs — Advanced setup (Windows), read 18 November 2026
- Claude Code docs — Customize your status line, read 18 November 2026
- Ghostty — download, read 18 November 2026
- iTerm2 on GitHub, read 18 November 2026
- WezTerm, read 18 November 2026
- kitty, read 18 November 2026
- Alacritty on GitHub, read 18 November 2026
- Windows Terminal on GitHub: MIT; 1.25 is the stable release since 2 October 2026, read 18 November 2026
- Warp pricing (Free; Build $20 a month, $18 billed yearly), read 18 November 2026
- Warp on GitHub — the client is open source, AGPL-3.0, read 18 November 2026
- Caprock source — terminals it opens sessions in (internal/nativeterm/nativeterm.go)
- Caprock source — status line (internal/statusline/statusline.go)
- Caprock docs — the app's terminal: tabs, split panes, find, drop a file, terminal look (docs/app.md)
- Caprock source — Shift+Enter, Option+Enter and Ctrl+J send a new line (ui/src/lib/xtermInput.ts)
Try it
The record of every coding agent you run, the sessions it did not start included. Free, open source; nothing leaves your machine.
Caprock is a desktop app: it installs on your computer, not your phone.
Or email yourself the link:
macOS, Windows and Linux. Your phone pairs with it by QR code. Install options →
Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.
Windows 10 22H2 or later, x64. Windows may ask once whether to run it: click More info, then Run anyway.
Paste it into Claude Code, Codex or any coding agent.
See what it says ▾
Install the Caprock desktop app for me. It is open source (Apache-2.0), a local app for my coding agents: https://github.com/dspv/caprock What the install does and how to remove it: https://github.com/dspv/caprock/blob/master/docs/install-agent.md Run the install script for my system: https://caprock.dev/mac.sh, /win.ps1 or /linux.sh. Read it before you run it if you like. Leave my Claude Code settings alone; the app asks me itself. Tell me when it's open.
Or run it yourself:
Paste in Terminal: it installs Caprock and opens it.
Or run it yourself:
Paste in PowerShell: it installs Caprock for you and opens it.
Or run it yourself:
Paste in a terminal: it installs Caprock for you, no sudo.