Skip to content

Instantly share code, notes, and snippets.

@wey-gu
Created December 31, 2024 16:01
Show Gist options
  • Save wey-gu/22a32dc80a24a3314baa8c18acd0c919 to your computer and use it in GitHub Desktop.
Save wey-gu/22a32dc80a24a3314baa8c18acd0c919 to your computer and use it in GitHub Desktop.
Install zig and build ghostty on Linux
# Step 0
# Place prebuild zig binary, say 0.13.0, check latest stable release via https://ziglang.org/download/

wget https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz
xz -d -v zig-linux-x86_64-0.13.0.tar.xz
tar xvf zig-linux-x86_64-0.13.0.tar
sudo mkdir -p /opt
sudo mv zig-linux-x86_64-0.13.0 /opt/
# Optionally add /opt/zig-linux-x86_64-0.13.0 to $PATH
# Put this to your shell's rc file like ~/.zshrc
export PATH="$PATH:/opt/zig-linux-x86_64-0.13.0"

# Step 1 build ghostty
# following https://ghostty.org/docs/install/build to install dep first...

git clone [email protected]:ghostty-org/ghostty.git && ghostty
/opt/zig-linux-x86_64-0.13.0/zig build -p $HOME/.local -Doptimize=ReleaseFast

# Step 2 run ghostty

export PATH="$PATH:$HOME/.local/bin"
ghostty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment