The full guide
Terminal, step by step
Claude Code runs in any terminal, but three need no setup at all: Ghostty, Kitty and iTerm2. In all three, Shift+Enter starts a new line and Claude Code sends desktop notifications when it needs you. WezTerm, Warp, Apple Terminal and Windows Terminal handle Shift+Enter too but need 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; over SSH after one setting |
| WezTerm | macOS, Linux, Windows | yes | bell or hook |
| Warp | macOS, Linux, Windows | yes | bell or hook |
| Apple Terminal | macOS | yes | bell or hook |
| Windows Terminal | Windows | yes | 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 20 October 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
Where Shift+Enter does not work out of the box, run this once inside Claude Code, outside tmux or screen:
/terminal-setup
In VS Code, Cursor and Devin Desktop it also turns off the terminal's GPU acceleration. Where nothing helps — GNOME Terminal, JetBrains — use Ctrl+J. You can rebind the keys with the chat:newline and chat:submit keybindings.
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, Kitty and iTerm2 show a native notification with no setup, and pass it on to your machine from a session over SSH; for that, iTerm2 needs Settings → Profiles → Terminal → "Notification Center Alerts" → "Filter Alerts" → "Send escape sequence-generated alerts". Everywhere else, pick the terminal bell or a hook in ~/.claude/settings.json:
{ "preferredNotifChannel": "terminal_bell" }
A Notification hook can run any command instead, such as a system notification or a sound.
Claude Code in tmux
Add three lines to ~/.tmux.conf and reload it. Passthrough lets notifications and the progress bar reach the outer terminal; extended keys make Shift+Enter work:
set -g allow-passthrough on set -s extended-keys on set -as terminal-features 'xterm*:extkeys'
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, 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.
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, 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 Terminal 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, Kitty or iTerm2 if you want no setup: Shift+Enter and native notifications work out of the box. iTerm2 is macOS only. On Windows, Windows Terminal, with the terminal bell or a notification hook.
- How do I make Shift+Enter add a new line in Claude Code?
- It works natively in Ghostty, Kitty, iTerm2, WezTerm, Warp, Apple Terminal and Windows Terminal. In VS Code, Cursor, Zed and older Alacritty 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, so notifications pass through and Shift+Enter works.
- How do I get notified when Claude Code needs input?
- Ghostty, Kitty and iTerm2 show native notifications. 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 in Windows Terminal without setup.
Sources
- Claude Code docs — Terminal guide for new users, read 20 October 2026
- Claude Code docs — Optimize your terminal setup, read 20 October 2026
- Claude Code docs — Interactive mode, read 20 October 2026
- Claude Code docs — Advanced setup (Windows), read 20 October 2026
- Claude Code docs — Customize your status line, read 20 October 2026
- Ghostty — download, read 20 October 2026
- iTerm2 on GitHub, read 20 October 2026
- WezTerm, read 20 October 2026
- kitty, read 20 October 2026
- Alacritty on GitHub, read 20 October 2026
- Windows Terminal on GitHub, read 20 October 2026
- Warp pricing (Free; Build $20 a month, $18 billed yearly), read 20 October 2026
- Warp on GitHub — the client is open source, AGPL-3.0, read 20 October 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.
Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.
Or run it yourself:
Paste in Terminal: it installs Caprock and opens it.Or with Homebrew: brew install --cask dspv/tap/caprock-app