Windows Subsystem for Linux

Install Ghostty in Windows using WSL

Ghostty is a new terminal emulator for macOS and Linux environments. Learn how to install Ghostty in Windows Subsystem for Linux (WSL).

In case you haven’t heard, there is a new terminal emulator that hit the scene, called Ghostty. It is the creation of Mitchell Hashimoto, the co-founder of Hashicorp. While this terminal emulator by Mitchell’s own words is not supposed to be revolutionary in itself, it is a breath of fresh air as a really great terminal emulator that natively integrates into macOS and Linux environments. While Ghostty isn’t said to be compatible directly with Windows Subsystem for Linux, it does work in Linux in general, so I wanted to try it out in an Ubuntu WSL environment. Let’s see how to install Ghostty in Windows Subsystem for Linux.

Not released for Windows yet if at all

I haven’t seen anywhere listed that Ghostty will be released for Windows natively. It seems to be purpose-built for Linux and macOS and there is no talk of it being released any time soon if at all. However, one tool that we have if using Windows that is awesome is Windows Subsystem for Linux (WSL).

I have seen some chatter on Reddit where some users have already ported it over as a Win32 application, but the PR for the project has not been accepted as of yet.

As you all know, WSL allows you to run Linux applications natively in Windows using a native terminal. So can Ghostty run in WSL?

Install Ghostty in WSL by building it from source

You can install Ghostty in WSL by building it from source from Github and the running it from WSL to try it in Windows. Let’s look at the steps required.

Ghostty terminal emulator
Ghostty terminal emulator

Install dependencies and Zig

First, we need to install the dependencies to build it from source:

sudo apt install libgtk-4-dev libadwaita-1-dev

Next, install Zig using the snap package:

sudo snap install --beta zig --classic
Snap install zig
Snap install zig

Clone Ghostty from Github

Now that we have the prerequisites and Zig installed, we can clone down Ghostty from source. To do that, you need to clone it down from the official GitHub repository URL:

https://github.com/ghostty-org/ghostty.git
Clone ghostty from source
Clone ghostty from source

Below, I am cloning down the repo into my WSL environment.

Cloning the ghostty project down from github
Cloning the ghostty project down from github

Build it from source code

Now that we have the project pulled down, change into the cloned ghostty directory and run the following command:

sudo zig build -p /usr -Doptimize=ReleaseFast
Building the ghostty project from source code
Building the ghostty project from source code

Viewing help options

You can view the available action commands and help options with the command:

ghostty --help
Viewing available actions in ghostty
Viewing available actions in ghostty

Launching Ghostty

Once the build of Ghostty from source completes successfully, you can launch it using the simple command in WSL:

ghostty

It will pop open a new terminal window in Windows that you can then interact with. You can open additional tabs, and other features.

Ghostty launched and installing powershell
Ghostty launched and installing powershell

Viewing Ghostty Theme Preview

You can launch the Ghostty Theme Preview using the command:

ghostty +list-themes
Ghostty +list themes
Ghostty +list themes

It will launch the Theme Preview utility. You can scroll and click to view the look of each profile in the window.

Ghostty theme preview
Ghostty theme preview

You can select themes in your configuration file

~/.config/ghostty/config

For instance, to select one of the popular themes like the Catppucin theme:

theme = catppuccin-frappe

You will need to copy the contents of the theme to your directory:

~/.config/ghostty/themes

Impressions?

One of the first impressions you will have with Ghostty is how fast it is. It is extremely fast in native environments like macOS and Linux. It also has GPU acceleration so you really feel this when running the Ghostty terminal.

I would love to see this implemented natively so it can be used as a terminal in WSL in VSCode in a seamless way. I know there are a lot of smart people out there already likely working on this. I want to have more hands on with the terminal to provide a more longterm review of using it in WSL in Windows.

There are helpful links for Ghostty documentation and other resources to note:

Windows Subsystem for Linux tweaks

Check out my video covering Windows Subsystem for LInux tweaks and mods that you need to know here:

Wrapping up

Have you tried Ghostty yet? Are you planning on trying it? If you were wondering if you can use it in Windows, well, at least not natively. You have to install it in WSL by building it from source. However, as the steps above show, there isn’t much to doing this. Let me know in the comments if you have tried it yet or installed it in WSL.

It’s amazing how much buzz and excitement these types of projects generate and just how much we all know and love the CLI on various systems.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.