The installation and configuration of the Ghostty terminal.

The installation and configuration of the Ghostty terminal.

终端
Ghostty
MacOS
Other languages简体中文
Created: 01/01/2025
Updated: 02/08/2025
Word count: 649
Reading time: 3.25minutes

Installing and configuring Ghostty terminal on macOS.

Introduction

In the modern developer's toolkit, the terminal emulator holds an place. While the market already offers numerous exceptional terminal emulators, they often represent a trade-off between speed, features, and a native user interface.Ghostty, however, emerges to disrupt this equilibrium, offering a terminal tool that harmonizes rapid responsiveness, feature richness, and a truly native experience.ty seeks to transcend the limitations of the so-called "impossible triangle." Among all terminal software, Ghostty may not claim the title of the absolutebest" in terms of being the fastest, the most feature-heavy, or the most native. Yet, it excels by creating a well-balanced synergy among three aspects, sparing you the need to compromise. Additionally, Ghostty aspires to expand the horizons of terminal emulation, empowering CLI developers to richer, more interactive applications through modern, optional features.

This innovative project was initiated by Mitchell Hashimoto as a personal endeavor. As an open software, it thrives under the stewardship of a dedicated community of passionate contributors. Ghostty was never designed to dominate the market but instead aims to provide developers with a complete and superior terminal experience. Its primary advantages are as follows:

  • Native Experience
    Ghostty seamlessly integrates with desktop environments on mac and Linux, harnessing the native system APIs to deliver familiar shortcuts, window capabilities, and unique system functionalities like macOS's Quick Look and Secure Input API.

  • Feature-Rich
    Ghostty supports a wide of modern terminal functionalities, including the Kitty graphics protocol, hyperlinks, and/dark theme switching. Advanced features like tabs, splits, and dropdown terminals enhance productivity.

  • High Responsiveness
    By optimizing startup, scroll speed, and I/O throughput, Ghostty ensures exceptional performance. "speed" is subjective, users consistently report a noticeable performance boost, their day-to-day interactions.

Ghostty employs a shared core library, ghostty, that separates terminal emulation, font processing, and rendering from the graphical user interface. This architecture not only facilitates efficient development and maintenance also enables other projects to create diverse terminal tools atop the same robust foundation.

The sections below will provide a detailed guide on installing and configuring Ghostty---

Download and Installation

You can download Ghostty from the official: https://ghostty.org/download For this guide, I use Homebrew for installation:

bash
brew --cask ghostty

Basic Configuration

Here my default configuration, which retains the original theme colors (Apple System Colors).

more customized configurations, please refer to the official documentation or use the Graphical Configuration Tool to export your settings. Once, paste them into the file located at:
$HOME/Library\ Support/com.mitchellh.ghostty/config

ini
Config generated by Ghostty Config # Default shell, here I use fish shell command = /opt/homebrew/bin/fish working-directory = clipboard-read = allow clipboard-write = allow copy-on-select true background-opacity = 0.75 background-blur-radius = 10 window-height = 24 window-width = 80 theme Apple System Colors background = #1e1e1e -background = #3f638b selection-foreground = #ffffff -color = #98989d palette = 0=#1a11a palette = 1=#cc372e palette = 2=#26a439 palette = 3=#cdac08 = 4=#0869cb palette = 5=#9647bf palette = 6=#479ec2 palette = 7=#89d palette = 8=#464646 palette = 9=#ff453a palette = 10=#32d74b = 11=#ffd60a palette = 12=#0aff palette = 13=#bf5af2 palette = 14=#76d6ff palette = 15=#ffffff font = 18 font-thicken = true macos-titlebar-style native font-family = Roboto Mono Regular

Configured Appearance


Addressing SSH Issues

When using Ghostty to connect to a server via SSH, you may encounter the following warnings:

txt
: Could not set up terminal. warning: TERM environment variable set to 'term-ghostty'. warning: Check that this terminal type is supported this system. warning: Using fallback terminal type 'xterm-256color'.

Or perhaps the following error when running certain commands:

bashroot
'xterm-ghostty': unknown terminal type.

To resolve these issues, you must copy Ghostty terminfo entry to the remote machine. Execute the following command on your target server:

bash
infocmp -x | ssh USER@YOUR-SERVER -- tic -x -

For example:

bash
infocmpx | ssh root@debian.local -- tic -x -

The terminal may display a warning such as:
"<stdin>", line 2, col 31, terminal 'xterm-ghostty': older tic versions may treat description field as an alias which can be safely ignored.

Afterward, upon re-entering the terminal, the issues should be resolved. For more, please refer to this discussion or consult: httpsghostty.org/docs/help/terminfo.


References