Claude Code terminal setup: the short answer
Claude Code terminal setup is mostly optional. It works in any terminal out of the box, and Anthropic's own docs say that if everything already feels right, you do not need to change anything. The setup only matters when something specific misbehaves: Shift+Enter sends your prompt instead of adding a line, Option-key shortcuts do nothing on a Mac, you get no alert when Claude finishes, or tmux eats your keys. For most of those, the fix is running /terminal-setup once inside Claude Code or changing one setting.
Quick note before the details: if you use the Claude Code desktop app, none of this applies. The app handles input, notifications and display for you, and it is where I point most people starting out. This post is for when you run Claude Code in a terminal, or in an editor's built-in terminal.
Fix Shift+Enter for new lines
Enter sends your message. To add a line break without sending, press Ctrl+J, or type a backslash and then press Enter. Both work in every terminal with no setup, so if you only learn one thing from this post, learn Ctrl+J.
Shift+Enter is the one most people reach for, and whether it works depends on your terminal:
Shift+Enter support by terminal, from Anthropic's terminal configuration docs
| Terminal | Shift+Enter for a new line |
|---|---|
| Ghostty, Kitty, iTerm2, WezTerm, Warp, Apple Terminal, Windows Terminal | Works without setup |
| VS Code, Cursor, Zed, Alacritty before 0.16 | Run /terminal-setup once |
| gnome-terminal, JetBrains IDEs such as PyCharm and Android Studio | Not available. Use Ctrl+J, or a backslash then Enter |
In VS Code, Cursor and Zed, /terminal-setup writes a Shift+Enter key binding into that program's settings. It leaves existing bindings alone, and in Zed it backs up your keymap before changing it. In VS Code and Cursor it also turns off GPU acceleration for the built-in terminal to prevent garbled text. If you want that back, set terminal.integrated.gpuAcceleration to "auto" and reload the window.
Make Option-key shortcuts work on a Mac
Some Claude Code shortcuts use the Option key, like Option+P to switch models. On a Mac, most terminals do not send Option as a modifier by default, so these shortcuts do nothing until you turn it on. The setting is usually called "Use Option as Meta Key".
- Apple Terminal: Settings, then Profiles, then Keyboard, and check "Use Option as Meta Key". If you accepted Claude Code's first-run terminal setup prompt, this is already done.
- iTerm2: Settings, then Profiles, then Keys, then General, and set both Left Option key and Right Option key to "Esc+".
- VS Code's built-in terminal: add "terminal.integrated.macOptionIsMeta": true to your VS Code settings.
- Ghostty, Kitty and others: look for an Option-as-Alt or Option-as-Meta setting in the terminal's config file.
In iTerm2, /terminal-setup also lets applications access the clipboard, so the /copy command can put Claude's output on your clipboard. Restart iTerm2 after running it.
Get an alert when Claude finishes
This is the setting that changes how you work. When Claude finishes a task or stops to ask for permission while you are away, Claude Code fires a notification. If you can hear or see it, you can start a long task and go do something else instead of watching the screen.
By default, Claude Code sends a desktop notification only in Ghostty, Kitty and iTerm2. In any other terminal, the simplest fix is a terminal bell. Add this to ~/.claude/settings.json:
{ "preferredNotifChannel": "terminal_bell" }
If you want a specific sound or a desktop popup instead, use a Notification hook. A hook runs a command whenever Claude needs your attention, and it works in any terminal, including ones that never get the desktop notification, like Warp or the VS Code built-in terminal. On a Mac, a hook that runs afplay /System/Library/Sounds/Glass.aiff plays a system sound. Claude Code hooks that earn their keep covers how hooks work, and Claude Code settings.json explains where the settings file lives.
Set up tmux for Claude Code
Inside tmux, Shift+Enter sends the prompt and notifications never reach your real terminal, even if your terminal supports both. Add these three lines to ~/.tmux.conf, then run tmux source-file ~/.tmux.conf to apply them:
- set -g allow-passthrough on
- set -s extended-keys on
- set -as terminal-features 'xterm*:extkeys'
The first line lets notifications and progress updates pass through tmux to your terminal. The other two let tmux tell Shift+Enter apart from plain Enter.
Match the theme and fix display problems
Run /theme, or use the theme picker in /config, to pick a Claude Code theme that fits your terminal. The auto option detects whether your terminal has a light or dark background and follows it when your system switches. Claude Code does not change the terminal's own colors. Those come from the terminal app.
You can also build your own theme. In /theme, choose "New custom theme" at the bottom of the list, name it and pick colors to change. Each custom theme is saved as a JSON file in ~/.claude/themes/, starting from a built-in preset and overriding only the colors you set. For the bar at the bottom of the screen, custom statuslines shows how to display the model, folder or git branch.
If the screen flickers or the scroll position jumps while Claude works, switch to fullscreen rendering with /tui fullscreen. You then scroll inside Claude Code with the mouse or PageUp instead of your terminal's own scrollback.
What I would set up first
My take: do two things and stop. Learn Ctrl+J for new lines, because it works everywhere and you never have to think about which terminal you are in. Then turn on an alert when Claude finishes, either the terminal bell or a Notification hook. That one change is what lets you hand Claude a longer task and walk away, which is where the real time savings are. Themes and tmux tweaks can wait until something actually bothers you.
And if you are still deciding where to run Claude Code, start in the desktop app. You skip this whole page. Claude Code day one setup walks through the first hour.
Short, practical drops on skills, MCP, agents, prompts, and more. No spam, unsubscribe anytime.
Frequently asked questions
Do I need to set up my terminal for Claude Code?
No. Claude Code works in any terminal without configuration. Only change settings when something specific misbehaves, like Shift+Enter sending your prompt or no alert when Claude finishes.
What does /terminal-setup do in Claude Code?
In VS Code, Cursor, Zed and older Alacritty, it adds a Shift+Enter key binding for new lines. In Apple Terminal it turns on Option as Meta. In iTerm2 it lets the /copy command use your clipboard. Run it in the terminal itself, not inside tmux.
Why does Shift+Enter send my prompt in Claude Code?
Your terminal is not telling Shift+Enter apart from Enter. Run /terminal-setup if you are in VS Code, Cursor or Zed, add the tmux lines if you are in tmux, or use Ctrl+J, which adds a new line in every terminal.
How do I get a notification when Claude Code finishes?
Ghostty, Kitty and iTerm2 get desktop notifications by default. In other terminals, set preferredNotifChannel to terminal_bell in ~/.claude/settings.json, or add a Notification hook that plays a sound or runs a command.
How do I change the Claude Code theme?
Run /theme or open the theme picker in /config. The auto option follows your terminal's light or dark background. You can also create a custom theme, which is saved as a JSON file in ~/.claude/themes/.
Last reviewed by David Iya on October 17, 2026

