Ghostty Terminal: A Complete Setup Guide for Modern Mac Development

Learn how to install and configure Ghostty terminal on Mac. Then enhance it with a modern prompt, zsh plugins, and tmux for a fast, GPU-accelerated workflow.

Ghostty Terminal: A Complete Setup Guide for Modern Mac Development

Ghostty is a modern, GPU-accelerated terminal emulator that’s quickly gaining popularity among developers and power users. It’s fast, native-feeling on macOS, and straightforward to configure.

In this guide you’ll:

  • Install Ghostty and a Nerd Font (so icons render correctly)
  • Set up a clean ~/.config/ghostty/config
  • Learn the standout Ghostty features (themes, inspector, shaders, image support)
  • (Optional) Layer in a modern prompt and productivity tools like tmux and zoxide

If you specifically want Starship + Ghostty with presets and a complete prompt setup, see my companion guide: Turbocharge Your Mac Terminal: The Ultimate Starship and Ghostty Setup Guide: https://www.bitdoze.com/starship-ghostty-terminal/

Key Features of Ghostty

GPU Acceleration

Ghostty leverages your computer’s GPU for rendering, resulting in smooth scrolling and excellent performance, even with complex terminal outputs. This GPU acceleration ensures a responsive and fluid experience, especially when dealing with large amounts of text or running resource-intensive tasks.

Native UI

Unlike some cross-platform terminals that use custom or web-based UIs, Ghostty focuses on a platform-native GUI. On Linux, it uses GTK4/libadwaita, while on macOS, it employs Swift, AppKit, and SwiftUI. This approach ensures that Ghostty feels integrated with your operating system, providing a seamless user experience.

Simple Configuration File (Key-Value)

Ghostty uses a simple key-value configuration file (for example ~/.config/ghostty/config). This makes it easy to tune fonts, themes, opacity, and behavior without learning a custom programming language.

Built-in Multiplexer

Ghostty includes built-in multiplexing capabilities, allowing you to manage multiple terminal sessions within a single window. This feature eliminates the need for external tools like tmux for many users.

Rich Color Support

The terminal supports 24-bit true color and offers a wide range of color schemes out of the box. With over 100 built-in themes and support for custom ones, you can easily personalize your terminal’s appearance.

Image Support

Ghostty supports the Kitty Graphics Protocol, allowing you to display images directly in the terminal. This can be particularly useful for certain workflows or for adding visual elements to your terminal environment.

Performance

Ghostty is built using the Zig programming language, which contributes to its impressive speed. Benchmarks often place Ghostty among the fastest terminals for reading and displaying large Unicode files.

Note: benchmark results vary based on your machine, settings (font, ligatures, opacity, shader effects), and the specific workload. Treat numbers as directional, not absolute.

TerminalVersionSpeed
Ghostty173ms
Alacritty0.13.166ms
WezTerm20240203140ms

Unique Features

Terminal Inspector

One of Ghostty’s standout features is its Terminal Inspector. This real-time debugging tool allows you to peer into every detail of your terminal’s activity, from keystrokes to render timings. It’s an invaluable tool for understanding and optimizing your terminal usage.

Shaders

Ghostty supports custom shaders, allowing you to apply visual effects to your terminal. Whether you want a subtle glow or a retro CRT effect, shaders let you customize the visual atmosphere of your terminal environment.

Installation and Configuration

If you are interested to see some free cool Mac Apps you can check toolhunt.net mac apps section.

Quickstart (TL;DR)

If you just want Ghostty working with a clean look, run these and then continue with the detailed sections below:

brew install --cask ghostty
brew install font-meslo-lg-nerd-font
mkdir -p ~/.config/ghostty

After that, create ~/.config/ghostty/config, add a basic config (provided below), then restart Ghostty.

Ghostty Install

You can download Ghostty as a package on your Mac or you can install it with Homebrew:

brew install --cask ghostty

Install Meslo Nerd Font

Nerd Fonts are a collection of fonts that have been patched with a high number of glyphs (icons). They’re particularly useful for developers as they include many programming-related icons that can enhance your terminal and text editor experience.

To install the Meslo Nerd Font using Homebrew, run the following command:

brew install font-meslo-lg-nerd-font

This command does the following:

  1. It uses Homebrew to install the Meslo LG Nerd Font.
  2. The font will be downloaded and installed in your system’s font directory.

After running this command, the font should be available for use in Ghostty and other applications on your Mac.

To verify that the font was installed correctly, you can check your Font Book application or use it in an application that allows font selection.

It’s worth noting that you may need to restart Ghostty or any other applications where you want to use this font after installation.

The Meslo Nerd Font is an excellent choice for terminal use as it’s clear, easily readable, and includes a wide range of glyphs that can be useful in command-line interfaces and programming environments.

In the next section, we’ll configure Ghostty to use this newly installed font.

Setup Ghostty Config File

To set up the Ghostty config file with the specified settings, follow these steps:

  1. Create or open the Ghostty configuration file:
mkdir -p ~/.config/ghostty
touch ~/.config/ghostty/config
vim ~/.config/ghostty/config
  1. Add the following configuration to the file:
font-family = MesloLGS Nerd Font Mono
font-size = 18
background-opacity = 0.9
theme = Argonaut

This configuration does the following:

  • Sets the font family to MesloLGS Nerd Font Mono (great Nerd Font glyph coverage)
  • Uses a readable font size (tweak to taste)
  • Sets background opacity to 0.9
  • Applies the Argonaut color theme

Useful discovery commands:

  • List fonts available to Ghostty:
    ghostty +list-fonts
  • List themes available to Ghostty:
    ghostty +list-themes

After saving this configuration, fully restart Ghostty. If icons look misaligned or missing, double-check that Ghostty is actually using the Nerd Font you installed.

Tip: If you want to keep configuration reproducible across machines, keep your Ghostty config minimal and put heavier customization in your shell (.zshrc) or prompt (Starship / Powerlevel10k).

Prompt Options (Pick One)

At this point Ghostty is set up and usable. Next, choose how you want your prompt to look and behave.

  • Starship: cross-shell, easy presets, fast, great defaults. If you want Starship with Ghostty step-by-step and ready-made presets, follow my dedicated guide: https://www.bitdoze.com/starship-ghostty-terminal/
  • Powerlevel10k: Zsh-focused, extremely customizable, excellent experience for Zsh power users.

Install powerlevel10k theme

Powerlevel10k is a highly customizable theme for Zsh that emphasizes speed, flexibility, and out-of-the-box experience. It’s designed to make your command line informative and visually appealing without sacrificing performance.

To install Powerlevel10k using Homebrew, run the following commands:

brew install powerlevel10k
echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >> ~/.zshrc

Let’s break down what these commands do:

  1. The first command installs Powerlevel10k using Homebrew.
  2. The second command adds a line to your .zshrc file that sources the Powerlevel10k theme. This ensures that the theme is loaded every time you start a new Zsh session.

After running these commands, you need to apply the changes to your current session:

source ~/.zshrc

This command reloads your Zsh configuration, applying the Powerlevel10k theme.

When you first run this, you’ll likely be greeted with the Powerlevel10k configuration wizard. This interactive process allows you to customize various aspects of your prompt, including:

  • The style of the prompt
  • Which segments to display (git status, time, etc.)
  • Color scheme
  • Icons and glyphs

Follow the on-screen instructions to set up Powerlevel10k according to your preferences. Don’t worry if you’re not sure about some options – you can always reconfigure later by running p10k configure.

Once configured, you’ll have a highly informative and visually appealing prompt that can show git status, execution time of commands, and much more, all while maintaining excellent performance.

Remember, you can always fine-tune your Powerlevel10k configuration by editing the ~/.p10k.zsh file that was created during the configuration process.

Setup zsh-autosuggestions plugin

Zsh-autosuggestions is a powerful plugin that suggests commands as you type based on your command history and completions. It can significantly speed up your command-line workflow by reducing the amount of typing needed for frequently used commands.

For a more detailed guide on enabling command autocomplete in Zsh, check out this article: Enable Command Autocomplete in Zsh

To install zsh-autosuggestions using Homebrew, run the following commands:

brew install zsh-autosuggestions
echo "source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
source ~/.zshrc

Let’s break down these commands:

  1. The first command installs the zsh-autosuggestions plugin using Homebrew.
  2. The second command adds a line to your .zshrc file that sources the zsh-autosuggestions plugin. This ensures that the plugin is loaded every time you start a new Zsh session.
  3. The third command reloads your Zsh configuration, applying the changes immediately.

After running these commands, you should see autosuggestions appear as you type in your terminal. The suggestions will be shown in a faded gray color. To accept a suggestion, you can typically press the right arrow key or End key.

You can customize the behavior of zsh-autosuggestions by adding configuration options to your .zshrc file. For example, you can change the color of the suggestions or modify the key bindings used to accept suggestions.

With zsh-autosuggestions set up, you’ll find that entering commands becomes faster and more efficient, especially for long or complex commands that you use frequently.

Setup zsh-syntax-highlighting

Zsh-syntax-highlighting is a plugin that provides syntax highlighting for the shell zsh. It enables highlighting of commands while they are typed at a zsh prompt into an interactive terminal. This helps in catching syntax errors, missing quotes, and other common mistakes before executing a command.

For a more comprehensive guide on enabling syntax highlighting in Zsh, check out this article: Enable Syntax Highlighting in Zsh

To install zsh-syntax-highlighting using Homebrew, run the following commands:

brew install zsh-syntax-highlighting
echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
source ~/.zshrc

Let’s break down these commands:

  1. The first command installs the zsh-syntax-highlighting plugin using Homebrew.
  2. The second command adds a line to your .zshrc file that sources the zsh-syntax-highlighting plugin. This ensures that the plugin is loaded every time you start a new Zsh session.
  3. The third command reloads your Zsh configuration, applying the changes immediately.

After running these commands, you should see syntax highlighting in your terminal as you type commands. Typically, correctly typed commands will appear in green, while errors or unknown commands will appear in red.

Some key features of zsh-syntax-highlighting include:

  • Command highlighting: Valid commands are highlighted differently from invalid ones.
  • Option highlighting: Valid options for commands are highlighted.
  • Path highlighting: Existing file paths are underlined.
  • Bracket matching: Brackets are highlighted in pairs.

You can customize the colors and styles used by zsh-syntax-highlighting by adding configuration options to your .zshrc file. This allows you to tailor the appearance to your preferences or to match your terminal’s color scheme.

With zsh-syntax-highlighting set up, you’ll find it easier to spot and correct mistakes in your commands before executing them, leading to a more efficient and error-free command-line experience.

Enhance Ghostty with tmux and zoxide

Ghostty already has built-in multiplexing capabilities, but tmux is still a great choice if you:

  • Want a highly mature ecosystem and documentation
  • Need reliable remote attach/detach workflows over SSH
  • Share sessions or standardize workflows across machines/teams

zoxide complements both Ghostty and tmux by making directory navigation dramatically faster.

What is tmux and how can it help

Tmux (Terminal Multiplexer) is a powerful tool that allows you to create multiple terminal sessions within a single window. It’s particularly useful for:

  • Managing multiple terminal sessions
  • Running long processes in the background
  • Sharing terminal sessions with other users
  • Preserving your terminal setup across system reboots

To learn more about tmux and its basic usage, check out this guide: Tmux Basics

To install tmux using Homebrew, run:

brew install tmux

After installation, you can start a new tmux session by simply typing tmux in your terminal.

What is zoxide and how can it help

Zoxide is a smarter cd command that helps you navigate your filesystem more efficiently. It remembers which directories you use most frequently, so you can “jump” to them in just a few keystrokes.

Key features of zoxide include:

  • Faster navigation to frequently-used directories
  • Fuzzy matching for directory names
  • Integration with common shells and file managers

For a detailed guide on using zoxide, refer to this article: Zoxide Guide

To install zoxide using Homebrew, run:

brew install zoxide

Then, add the following line to your ~/.zshrc file to initialize zoxide:

eval "$(zoxide init zsh)"

After restarting your shell or running source ~/.zshrc, you can start using zoxide. For example, use z instead of cd to navigate to directories.

By integrating tmux and zoxide with Ghostty, you’re creating a powerful, efficient terminal environment. Tmux allows you to manage complex workflows with multiple panes and windows, while zoxide speeds up your navigation between projects and directories. Together with Ghostty’s GPU acceleration and customizability, you’ll have a terminal setup that significantly boosts your productivity.

Known Ghostty Errors

’xterm-ghostty’: unknown terminal type

On some remote Linux machines, tools may not recognize Ghostty’s terminal type and you can see errors like: 'xterm-ghostty': unknown terminal type.

Quick fix for the current session:

export TERM=xterm-256color

If you want it permanent for Bash on that machine:

echo "export TERM=xterm-256color" >> ~/.bashrc
source ~/.bashrc

If you only see this problem when connected over SSH, consider setting TERM conditionally in your shell config instead of globally.

Conclusion

Ghostty represents a new generation of terminal emulators, combining performance, customizability, and modern features. Its focus on native UI, GPU acceleration, and innovative tools like the Terminal Inspector set it apart from other options. While it’s still in active development, Ghostty is already proving to be a powerful and flexible choice for users who demand more from their terminal emulator.

Whether you’re a developer, system administrator, or power user, Ghostty offers a compelling package that’s worth exploring. As it continues to evolve, it may well become the go-to terminal for those seeking the perfect blend of speed, features, and customization.