Ghostty 安装指南:10 分钟拿到原生 GPU 加速终端
【免费下载链接】ghostty👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.项目地址: https://gitcode.com/GitHub_Trending/gh/ghostty
装完你得到一个开窗口秒开、刷大日志也不卡的终端。Ghostty 是跨平台终端模拟器,靠 GPU 加速渲染和原生界面吃饭。这篇文章给有基本命令行基础、想一次装通的你。
选你的安装方式
| 方式名称 | 适合谁 | 一条命令 |
|---|---|---|
| 包管理器 | 日常使用,装完就用 | brew install ghostty |
| Nix | Nix 用户 | nix profile install nixpkgs#ghostty |
| 源码构建 | 尝鲜最新特性、参与开发 | zig build |
90% 的人走第一行就够了,下面只展开这条路径。
跟做:包管理器安装
环境检查:最低要求 macOS 13 及以上,Linux 用主流发行版即可。
sw_vers执行安装,这里以 Homebrew 为例,Linux 换成你的发行版包管理器。
brew install ghostty验证启动,输出版本号即表示二进制就位。
ghostty +version装完第一件事
输入ls能正常列出目录,就算通了。
接下来两行配置。配置文件在~/.config/ghostty/config,macOS 在~/Library/Application Support/com.mitchellh.ghostty/config:
font-family = JetBrains Mono theme = catppuccin-mocha保存后按 Ctrl+Shift+,(macOS 为 Cmd+Shift+,)热重载。
想从源码构建?
适合尝鲜最新特性或准备参与开发的人,四步走:
- 拿源码:
git clone https://gitcode.com/GitHub_Trending/gh/ghostty - 装依赖:Zig 需 0.16.0+,Linux 另装 GTK3 与 blueprint-compiler:
sudo apt install libgtk-3-dev blueprint-compiler - 编译:
zig build -Doptimize=ReleaseFast - 启动:
./zig-out/bin/ghostty
具体以仓库 HACKING.md 或官方文档为准。
装不上?三行速查
| 症状关键词 | 大概率原因 | 修复命令 |
|---|---|---|
| 缺 GTK、blueprint-compiler | Linux 构建依赖没装 | sudo apt install libgtk-3-dev blueprint-compiler |
| macOS 报 SDK、工具链错误 | Xcode 版本不对或未选中 | sudo xcode-select --switch /Applications/Xcode.app |
zig build报版本错误 | Zig 低于 0.16.0 | 升级 Zig 后重跑zig build |
更细的问题去官方 Discussions、Discord 和文档查。
打开窗口,把字体和主题调成顺眼的,开始干活。
【免费下载链接】ghostty👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.项目地址: https://gitcode.com/GitHub_Trending/gh/ghostty
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考