In recent times, terminal emulators have witnessed a significant transformation as developers strive to modernize the classic console to harness contemporary hardware, GPU acceleration, containerized workflows, and, in some cases, the power of AI. Among the wave of innovations, Ghostty stands out as a promising new open-source and cross-platform terminal application created by Mitchell Hashimoto, co-founder of HashiCorp. With a vision to construct a terminal emulator that is fast, feature-rich, and boasts a platform-native GUI while maintaining cross-platform capabilities, Hashimoto’s creation is capturing the attention of the tech community.
The initial public release of Ghostty emerged around Christmas, bringing with it a semblance of a festive Dickensian phantom showing us a peek into the future of terminal emulation. One of the key unique selling propositions of Ghostty is its ‘platform-native GUI.’ Unlike other cross-platform terminal tools such as Warp, which often resort to non-native or custom web-based UIs for coding convenience and feature uniformity, Ghostty takes a different approach. It aims to provide a genuinely native experience specific to each operating system it supports, ensuring users feel connected and integrated with their systems.
Download Ghostty from GitHub
To begin your journey with Ghostty, the first step is to download the terminal from its releases page on GitHub. Navigate to the releases page and download Ghostty. Once you have the ZIP file downloaded, proceed to extract it to a convenient location on your computer. Open a new terminal window and use the cd
command to navigate to the directory where you extracted the Ghostty files. This step ensures that you have all the necessary files in place and that your terminal is pointed to the right directory for further actions. By setting this up, you are preparing your environment for the installation and compilation of Ghostty, a process that will unfold in the subsequent steps.
Ghostty’s approach to offering native GUIs on different operating systems sets it apart. On Linux, Ghostty’s graphical user interface is written in Zig and utilizes GTK4/libadwaita, while on macOS, the UI is crafted in Swift using AppKit and SwiftUI. This dedication to native development ensures that users experience truly native windows, tabs, menus, in-app icons, system fonts, and more. The goal is to avoid the detachment felt in other modern terminals that rely on more universal but less integrated interfaces. Moreover, the native look and feel of Ghostty help users feel more comfortable and productive within their environments, whether they are using Linux or macOS.
Install Necessary Dependencies
Before diving into the actual compilation of the terminal emulator, it’s crucial to install the necessary dependencies required to build Ghostty. In this context, the primary dependencies include libgtk-4-dev
and libadwaita-1-dev
. To install these on a Debian-based system, such as Ubuntu, you can use the following command:
sudo apt install libgtk-4-dev libadwaita-1-dev
This command ensures that your system has all the libraries and development tools required to compile Ghostty’s GUI. By taking this step, you make sure that the build process proceeds without hiccups, as missing dependencies are a common cause of build failures in software projects.
The installation of these dependencies sets the stage for the successful compilation and functioning of Ghostty. These libraries are integral for GTK4 applications, providing the necessary tools and components to create a user interface that adheres to modern standards. With these dependencies in place, you can move forward with the confidence that your system is properly equipped to handle the subsequent steps, ensuring a smooth installation process.
Install Zig 0.13
An essential requirement for building Ghostty is having Zig version 0.13 installed on your system. Zig is a programming language often used for system-level programming, and it plays a critical role in compiling Ghostty. You can download Zig version 0.13 from the Zig website, available as a tarball. After downloading the tarball, extract it to the /opt
directory on your system. If you prefer a simpler installation method, you can opt for the Zig Snap package, considered to be in beta, by running the following command:
sudo snap install --beta zig --classic
Installing the correct version of Zig is paramount to ensure compatibility with the Ghostty source code. The developers explicitly require version 0.13, so using a newer or different version may lead to potential build issues. This step ensures that your system has the correct tools to compile Ghostty correctly.
Having Zig 0.13 in place is a significant step forward in the installation process. The programming language is well-suited for developing robust and efficient system applications like Ghostty. Its presence on your system ensures that you can compile the terminal emulator without running into compatibility issues that stem from using an incorrect or unsupported version of the compiler.
Build and Install Ghostty Locally
Once you’ve downloaded Ghostty and installed the necessary dependencies and Zig 0.13, it’s time to build and install the terminal emulator locally. To begin the build process, navigate to the directory where you extracted Ghostty and use the command:
zig build -p $HOME/.local -Doptimize=ReleaseFast
This command initiates the compilation process, targeting the .local directory in your home folder for installation. The -Doptimize=ReleaseFast
flag is used to ensure that the build is optimized for fast performance, making Ghostty run efficiently on your system. The build process will take some time, depending on your system’s performance and hardware capabilities.
After the build completes, Ghostty will be installed locally, allowing you to run it from your home directory. This method ensures that Ghostty doesn’t interfere with system-wide configurations, providing a sandboxed environment to test and use the terminal emulator. This approach is particularly useful for users who prefer to keep system-level changes to a minimum or are testing Ghostty before making it their default terminal emulator.
Create Application Shortcut (if needed)
In some cases, after successfully building Ghostty, you might not see an application shortcut or launcher for it. If this happens, you can try updating the desktop database with the following command:
sudo update-desktop-database
This command attempts to create an entry for Ghostty in your system’s application menu, making it easier to launch the terminal emulator without having to navigate to its directory manually. If this approach doesn’t work, another solution is to build and install Ghostty system-wide. This can be achieved by running:
sudo zig build -p /usr -Doptimize=ReleaseFast
By installing Ghostty system-wide, you ensure that the application is accessible from the application launcher and available to all users on the system. This method might be preferred for users who intend to use Ghostty as their default terminal emulator or on multi-user systems.
Launch Ghostty
Recently, terminal emulators have undergone substantial changes as developers work to modernize the traditional console to leverage modern hardware, GPU acceleration, and AI capabilities. Among these innovations is Ghostty, a new open-source, cross-platform terminal application created by Mitchell Hashimoto, co-founder of HashiCorp. Hashimoto aims to build a fast, feature-rich terminal emulator with a platform-native GUI that maintains cross-platform functionality, drawing significant attention from the tech community.
Ghostty’s initial public release coincided with the Christmas season, like a festive Dickensian ghost hinting at the future of terminal emulation. Ghostty’s unique selling point is its ‘platform-native GUI.’ Unlike other cross-platform terminal tools such as Warp, which often use non-native or custom web-based UIs for coding ease and consistency, Ghostty aims to deliver a truly native experience tailored to each operating system it supports. This approach ensures that users feel fully integrated and connected with their systems, providing a seamless and immersive experience across different platforms.