Ghostty terminal: install, config, and the xterm-ghostty SSH fix
Ghostty 1.4 on macOS and Linux: install, where config.ghostty lives, fixing 'missing or unsuitable terminal: xterm-ghostty' over SSH, and agent settings.
Ghostty is a free, open-source (MIT) terminal emulator for macOS and Linux, started by Mitchell Hashimoto, with a native interface on each and GPU rendering. The current release is 1.4.0 (October 27, 2026); there is no Windows app. Its settings live in ~/.config/ghostty/config.ghostty. Ghostty sets TERM=xterm-ghostty, which many servers do not know yet, so SSH sessions can show “missing or unsuitable terminal: xterm-ghostty”. Fix it once per server with infocmp -x xterm-ghostty | ssh you@your-server -- tic -x -, or let Ghostty do it by adding shell-integration-features = ssh-env,ssh-terminfo. For coding agents it needs no setup: Claude Code’s Shift+Enter and desktop notifications work in it out of the box.
What it is, and where it runs
Ghostty is the window you type in, not a shell and not a session manager. Its own description is a terminal that is “fast, feature-rich, and native”: the macOS app is written in Swift, the Linux one uses GTK, and both share a core written in Zig called libghostty. That last part matters only if you build terminals; for everyone else Ghostty is an app like iTerm2, Kitty or WezTerm.
It runs on the computer in front of you. When your coding agent lives on a server, Ghostty stays on the laptop and you reach the server over SSH, so nothing of Ghostty is installed there, except the small terminfo description that the section below is about. What keeps an agent running after the laptop closes is a multiplexer on the server, such as tmux or Zellij, never the terminal app.
Installing it
On a Mac, download the universal Ghostty.dmg from ghostty.org (macOS 13 Ventura or later, Apple Silicon and Intel), or use the Homebrew cask, which repackages the same signed app:
brew install --cask ghosttyCopiedThe project builds official binaries for macOS only. On Linux, Ghostty comes from your distribution or from community packages, and its install page lists each with its status as of December 2026:
| Linux | Command | Who maintains it |
|---|---|---|
Arch | sudo pacman -S ghostty | Arch, in [extra] |
Ubuntu 26.04 and later | sudo apt install ghostty | Ubuntu; may trail the latest release |
Fedora | sudo dnf copr enable scottames/ghostty, then sudo dnf install ghostty | Community COPR |
Any, via Snap | sudo snap install ghostty --classic | An outside maintainer, built with Ghostty’s scripts |
Gentoo, Void, Solus, openSUSE, Nix, Alpine (testing) | The distribution’s package manager | The distribution |
Ghostty 1.4 needs GTK 4.18 and libadwaita 1.7, and the 1.4.0 release notes say Ubuntu 24.04 LTS does not meet that; on such a system they point to an older Ghostty or the Flatpak package. Ghostty’s page warns that community-built binaries such as the .deb script and the AppImage “carry a much higher risk compared to builds directly from the Ghostty project”. Windows has no Ghostty: the 1.4 notes say the project dropped its roadmap for a Windows app. On Windows, Windows Terminal 1.25 or later is the one Anthropic lists with Shift+Enter working for Claude Code.
The config file
Ghostty works with no config file at all. To change anything, create one at ~/.config/ghostty/config.ghostty (on a Mac, ~/Library/Application Support/com.mitchellh.ghostty/config.ghostty also works, and is read after the first). Versions before 1.2.3 called the file plain config, which is still read. Each line is key = value:
font-size = 14
macos-option-as-alt = true
shell-integration-features = ssh-env,ssh-terminfoCopiedReload it without restarting with cmd+shift+, on a Mac or ctrl+shift+, on Linux; a few options apply only to new windows. Every option, its default and its documentation print with:
ghostty +show-config --default --docs | lessCopiedIf your shell cannot find the ghostty command, the path shell-integration feature adds Ghostty’s binary directory to your PATH, even when your startup files reset it. The full list is the option reference.
“missing or unsuitable terminal: xterm-ghostty” over SSH
This is the problem nearly everyone who runs agents on a server meets. Ghostty sets TERM=xterm-ghostty, SSH passes it to the server, and programs there look the name up in the server’s terminfo database to learn what the terminal can do. When the entry is missing, they fail or fall back, with one of these, as Ghostty’s terminfo page lists them:
missing or unsuitable terminal: xterm-ghostty
Error opening terminal: xterm-ghostty.
WARNING: terminal is not fully functional
'xterm-ghostty': unknown terminal type.CopiedThe entry has been part of ncurses since version 6.5-20241228, but a server only has it once its distribution ships that ncurses and the package holding the entry is installed. Ubuntu 24.04, a common server image, ships ncurses 6.4. To see whether a server knows the name, run this on it; an error means it does not:
infocmp xterm-ghosttyCopiedThere are three fixes, and the first is the one to reach for.
1. Copy the entry to the server
From your own machine, in Ghostty, this reads Ghostty’s entry and compiles it on the server:
infocmp -x xterm-ghostty | ssh you@your-server -- tic -x -Copiedtic normally writes to the system database, /usr/share/terminfo. Run as an ordinary user it cannot, and its manual says it then uses ~/.terminfo if that directory exists, so the entry may serve only that account. For every account on the server, root and sudo included, save the entry to a file on your machine, copy it over and compile it there as root:
infocmp -x xterm-ghostty > xterm-ghostty.terminfo
scp xterm-ghostty.terminfo you@your-server:CopiedThen, logged in to the server:
sudo tic -x xterm-ghostty.terminfoCopiedOn a Mac older than macOS 14 Sonoma, the built-in infocmp cannot read Ghostty’s entry; install ncurses with Homebrew and use /opt/homebrew/opt/ncurses/bin/infocmp (on an Intel Mac, /usr/local/opt/ncurses/bin/infocmp) in its place.
2. Let Ghostty install it for you
Ghostty’s SSH integration does the same automatically. Add this to the config file and open a new window:
shell-integration-features = ssh-env,ssh-terminfoCopiedBoth features are off by default. ssh-terminfo installs the entry on each host the first time you connect and remembers the host, falling back to xterm-256color where the install fails; ssh-env forwards COLORTERM and the terminal’s name and version, which the server accepts only if its sshd_config allows them with AcceptEnv. Since 1.4.0 both run through ghostty +ssh, a wrapper you can also call yourself: ghostty +ssh -- you@your-server. The cache of hosts it has set up is listed by ghostty +ssh-cache, and ghostty +ssh-cache --remove=you@your-server forces a fresh install on the next connection.
It works by placing a shell function named ssh in your interactive shell (bash, zsh, fish, elvish or nushell, with Ghostty’s shell integration loaded), and that function is not inherited. Ghostty lists what bypasses it: scp, sftp, rsync -e ssh, git over SSH, mosh, scripts run as ./script.sh, Makefiles and cron. A mosh session therefore still arrives with xterm-ghostty, so a server you reach by mosh needs fix 1 once.
3. Tell SSH to send a name the server knows
With OpenSSH 8.7 or newer on your machine, a ~/.ssh/config block makes that host see xterm-256color instead:
Host your-server
SetEnv TERM=xterm-256colorCopiedEvery server knows that name, so the errors stop, but Ghostty’s docs note the fallback lacks some of its features, such as coloured and styled underlines. Use it for hosts where you cannot write to the database at all, and leave it off hosts that already have the entry, where it only downgrades the terminal.
When the error appears only under sudo
sudo resets the environment, so a root shell can lose the variable that points programs at Ghostty’s entry, on your own machine or on a server where the entry sits in one user’s home. On the server, installing it system-wide as in fix 1 ends it. On your own machine, Ghostty’s sudo shell-integration feature wraps sudo to keep it, or you can tell sudo to preserve TERMINFO.
Settings that matter when an agent runs in it
Most of what a coding agent needs from a terminal Ghostty already does by default. As of December 2026:
| What | In Ghostty |
|---|---|
New line in Claude Code with Shift+Enter | Works with no setup, per Anthropic’s terminal page; inside tmux it also needs tmux’s extended-keys |
Desktop notifications from programs | desktop-notifications = true by default, for the OSC 9 and OSC 777 sequences |
Option as Alt on a Mac | macos-option-as-alt; on by default only with the U.S. Standard and U.S. International layouts, otherwise set it to true for Claude Code’s Option shortcuts |
Scrollback | 50 MB per terminal by default since 1.4.0 (10 MB before), compressed while idle on macOS and 64-bit Linux; scrollback-limit is in bytes |
Clipboard | A program may write to it freely; reading it asks first (clipboard-read = ask) |
Copy on select | On by default on macOS and Linux |
Alert when a shell command finishes | Off (notify-on-command-finish = never); set it to unfocused or always, with notify-on-command-finish-action = notify for a desktop notification rather than the bell |
Claude Code detects Ghostty and sends a desktop notification when it finishes or waits for permission while you are away from the window. Over SSH outside tmux, Anthropic says to leave preferredNotifChannel at "auto" on the server; before Claude Code v2.1.326, set it to "ghostty". Inside tmux the notification only reaches Ghostty with set -g allow-passthrough on in the server’s ~/.tmux.conf, and only from a pane you are viewing. The Claude Code notifications guide covers the rest, phones included, and the new-line guide the tmux lines for Shift+Enter.
Codex chooses how to notify with tui.notification_method in its config file: auto, osc9 or bel. Since Ghostty turns OSC 9 into a desktop notification, setting osc9 should give the same result there; neither project’s docs state the pairing, so treat that as reading the two together. With bel, Ghostty instead puts a bell on the tab title and asks for attention while it is unfocused, which its bell-features does by default.
Ghostty with tmux
Ghostty has tabs and splits of its own, and they are enough on one machine. They live in the app, though: close the laptop and the shells in them, and any agent running there over SSH, go with it. For an agent on a server, run tmux or Zellij there and attach from a Ghostty window; the agent keeps working when you disconnect, and you pick it up from the next window, laptop or phone. Ghostty’s GUI does not hook up tmux’s control mode (the 1.4.0 notes say so), so tmux runs inside it as it would in any terminal, with its own windows and keys.
If tmux on a server will not start or attach from a Ghostty window, check the entry with infocmp xterm-ghostty first. With the entry installed, tmux needs the four lines from Anthropic’s tmux section for Claude Code’s Shift+Enter and notifications to pass through to Ghostty:
set -g allow-passthrough on
set -g focus-events on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'CopiedThen run tmux source-file ~/.tmux.conf, detach, attach again and restart the agent. Ghostty 1.3.0 and 1.3.1 could be crashed by malicious output through tmux’s control mode; 1.4.0 fixes it, which is one more reason to be on the current release.
Versions
Ghostty publishes its releases on its own site, not as GitHub releases. 1.4.0 came out on October 27, 2026, after 1.3.0 (March 9) and 1.3.1 (March 13). Besides +ssh and the larger scrollback, 1.4.0 adds the remaining parts of the kitty graphics protocol, the kitty clipboard protocol, macOS 27 support and a new GTK renderer. On Linux the version you run is whatever your package provides, which can trail the latest release.