How should you set up your terminal for Claude Code?
Claude Code works in any terminal without configuration, so terminal setup is about fixing specific annoyances: making Shift+Enter add a new line, enabling Option-key shortcuts on macOS, getting a notification when Claude finishes, making tmux pass keys through, matching the color theme, adding a status line and switching to fullscreen rendering if the screen flickers. The /terminal-setup command handles the common cases for you.
The official terminal configuration docs are organized by symptom, and this guide follows the same idea. If everything already feels right, you can skip most of it. If you have not installed Claude Code yet, start with our Claude Code setup guide.
What does /terminal-setup change?
/terminal-setup writes terminal-specific settings so you do not have to edit config files by hand. What it does depends on where you run it:
| Terminal | What /terminal-setup does |
|---|---|
| VS Code, Cursor, Devin Desktop | Adds a Shift+Enter binding, sets terminal.integrated.gpuAcceleration to "off", and tunes mouse wheel scroll sensitivity |
| Alacritty before 0.16 | Adds a Shift+Enter binding |
| Zed | Merges a Shift+Enter binding into keymap.json, after backing it up |
| Apple Terminal | Enables Option as Meta and turns off the audible bell |
| iTerm2 | Turns on clipboard access so /copy can write to your clipboard |
Run it directly in the host terminal rather than inside tmux or screen, since it needs to write to the host terminal's configuration. Existing bindings are left alone. In Apple Terminal, accepting Claude Code's first-run terminal setup prompt already ran it for you. To undo the GPU change in VS Code, set the value back to "auto" and reload the window.
How do you enter multiline prompts?
Enter submits. Ctrl+J, or a backslash followed by Enter, adds a new line in every terminal with no setup. Shift+Enter support depends on the terminal:
| Terminal | Shift+Enter for a new line |
|---|---|
| Ghostty, Kitty, iTerm2, WezTerm, Warp, Apple Terminal, Windows Terminal | Works without setup |
| Other kitty keyboard protocol terminals, such as foot and Alacritty 0.16+ | Works without setup (Claude Code v2.1.269 or later) |
| VS Code, Cursor, Devin Desktop, Alacritty before 0.16, Zed | Run /terminal-setup once |
| gnome-terminal, JetBrains IDEs | Not available; use Ctrl+J or \ then Enter |
To swap the behavior so Enter adds a line and Shift+Enter sends, map chat:newline and chat:submit in ~/.claude/keybindings.json. Our Claude Code keyboard shortcuts guide shows the file format.
How do you enable Option key shortcuts on macOS?
Shortcuts such as Option+Enter for a new line, Option+P to switch models, and Alt+B or Alt+F to move by word need the terminal to send Option as a modifier. Most macOS terminals do not do that by default. The setting is usually called "Use Option as Meta Key":
- Apple Terminal: Settings, Profiles, Keyboard, check "Use Option as Meta Key".
- iTerm2: Settings, Profiles, Keys, General, set Left Option key and Right Option key to "Esc+".
- VS Code: add
"terminal.integrated.macOptionIsMeta": trueto your settings. - Ghostty, Kitty and others: look for an Option-as-Alt or Option-as-Meta setting in the config file.
How do you get notified when Claude finishes?
When Claude finishes a task or waits on a permission prompt and you seem to be away, it fires a notification. By default Claude Code sends a desktop notification only in Ghostty, Kitty and iTerm2. Elsewhere, set preferredNotifChannel to ring the terminal bell:
{
"preferredNotifChannel": "terminal_bell"
}
Other accepted values include "auto" (the default), "iterm2", "iterm2_with_bell", "kitty", "ghostty" and "notifications_disabled". In iTerm2, also go to Settings, Profiles, Terminal, check "Notification Center Alerts", then under "Filter Alerts" enable "Send escape sequence-generated alerts". Desktop notifications reach your local machine over SSH too.
For a custom sound or command in any terminal, add a Notification hook. This macOS example plays a system sound:
{
"hooks": {
"Notification": [
{
"hooks": [{ "type": "command", "command": "afplay /System/Library/Sounds/Glass.aiff" }]
}
]
}
}
Hooks run alongside the built-in notification. See our Claude Code hooks guide for more events. Ghostty 1.2.0 or later, iTerm2 3.6.6 or later and ConEmu also show a progress indicator while Claude works, controlled by terminalProgressBarEnabled.
How do you configure tmux for Claude Code?
Inside tmux, Shift+Enter submits by default, and notifications and the progress bar never reach the outer terminal. Add these lines to ~/.tmux.conf, then run tmux source-file ~/.tmux.conf:
set -g allow-passthrough on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
The first line lets notifications through; the other two let tmux tell Shift+Enter apart from Enter. If you use fullscreen rendering, also add set -g mouse on so the mouse wheel scrolls Claude Code. Remember that Ctrl+B is the tmux prefix, so press it twice to background a task in Claude Code.
How do you match the color theme?
Run /theme, or use the theme picker in /config. Built-in options include auto, which follows your terminal's light or dark background, plus dark, light, colorblind-friendly dark-daltonized and light-daltonized, and dark-ansi and light-ansi, which use your terminal's own palette. Claude Code does not change the terminal's color scheme itself.
For a custom theme, choose New custom theme… at the end of the /theme list, or add a JSON file to ~/.claude/themes/:
{
"name": "Dracula",
"base": "dark",
"overrides": {
"claude": "#bd93f9",
"error": "#ff5555",
"success": "#50fa7b"
}
}
Claude Code watches that folder and reloads changes while it runs. If you work in a wide terminal, maxProseWidth wraps Claude's prose at a set column count, minimum 40, while tables and code keep the full width.
How do you add a status line?
A status line is a bar at the bottom of the interface that shows whatever a script prints, such as the model, folder, git branch, context usage or cost. Run /statusline and describe what you want, or run it with no arguments to configure one from your shell prompt. It runs locally and does not use API tokens. Our Claude Code statusline guide covers the JSON fields and ready-made scripts.
When should you switch to fullscreen rendering?
If the display flickers or the scroll position jumps while Claude works, switch to fullscreen rendering. It draws on the terminal's alternate screen, like vim, keeps the input box fixed at the bottom, keeps memory flat in long conversations, and adds mouse support. "Fullscreen" refers to how it draws, not your window size.
Run /tui fullscreen to switch and save the preference; your conversation relaunches intact. /tui default switches back, and /tui alone shows the active renderer. You can also start with an environment variable:
CLAUDE_CODE_NO_FLICKER=1 claude
Things work a little differently in fullscreen. Scroll with the mouse wheel or PgUp and PgDn. Search with Ctrl+O, then /, or press [ in the transcript to write the conversation to native scrollback. Selected text copies on mouse release. To keep your terminal's native selection, hold the terminal's bypass key while dragging (Option in iTerm2, Fn in Terminal.app, Shift in most others), or set CLAUDE_CODE_DISABLE_MOUSE=1. Avoid fullscreen in iTerm2's tmux -CC integration mode, which it does not support.
What else is worth configuring?
- Vim keys: set Editor mode to vim in
/config, or"editorMode": "vim"in settings. - Windows Backspace: if each Backspace deletes a whole word, set
CLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0. Our Claude Code on Windows guide has more Windows notes. - Large pastes: pastes over 800 characters or three lines collapse to a placeholder. For whole files or long logs, save them to a file and ask Claude to read it.
Once the terminal is comfortable, the next speedup is having your best prompts ready to paste. Kipt keeps prompts and Agent Skills as Markdown in a private GitHub repo you own, with Cmd+K search, and installs every skill into Claude Code with one npx skills add command.