ARTICLE DETAIL

资讯详情

深耕网站视觉设计与运营推广的一线实战洞察。

Ghostty 安装教程:15 分钟装好 GPU 加速终端并跑通第一次配置

Ghostty 安装教程:15 分钟装好 GPU 加速终端并跑通第一次配置 Ghostty 安装教程15 分钟装好 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 加速的跨平台终端窗口秒开、滚动不卡标签、分屏、主题开箱即用。下面带你从安装走到第一次配置。 先判断你该走哪条路按你的情况对号入座标准有三条只日常使用机器是 macOS、Arch 或已用 Nix → 走预编译不碰编译器想尝鲜最新特性、参与开发或你的发行版没有 Ghostty 包 → 走源码构建源码构建的前提机器上有 Zig 0.16.0 及以上缺就先升级拿不准就用预编译。装完跑一条ghostty version能出版本号就算成功。 安装主线两条路径分开走预编译安装步骤macOS 用 Homebrew 一条命令装好brew install ghosttyNix 用户各平台通用装入 profilenix profile install nixpkgs#ghosttyArch 系直接用包管理器sudo pacman -S ghostty其他发行版仓库里没有的话去 Ghostty 官网下载页拿对应平台的预编译包解压即用。源码构建步骤拉取仓库源码并进入目录git clone https://gitcode.com/GitHub_Trending/gh/ghostty cd ghosttyLinux 补上 GTK 与 blueprint-compiler 两个开发依赖Debian / Ubuntusudo apt install libgtk-3-dev blueprint-compilerArch 上对应为sudo pacman -S gtk3 blueprint-compilermacOS 只需装全 Xcode主分支要求 Xcode 26 与 macOS 26 SDK用这条确认当前生效的路径xcode-select --print-path编译ReleaseFast是日常使用的推荐档位zig build -DoptimizeReleaseFast想要调试构建就去掉优化参数直接zig build产物位置Linux 下可执行文件在zig-out/bin/ghosttymacOS 下zig-out里是应用包双击启动或zig build run直接运行✅ 验证安装是否跑通三条检查全过就算装好确认版本与 CLI 可用ghostty version启动终端开一个新窗口敲一条ls正常输出、无报错检查配置系统工作正常ghostty show-config --default写一份最小配置改完立刻生效首次启动时 Ghostty 会在默认路径生成配置模板Linux 是~/.config/ghostty/configmacOS 是~/Library/Application Support/com.mitchellh.ghostty/config。只写你想改的示例三行font-family JetBrains Mono theme catppuccin-mocha window-padding-x 12保存后不用重启按 CtrlShift,macOS 为 CmdShift,触发 reload_config 热重载字体和主题当场切换。想看全部配置项和默认值跑ghostty show-config --default --docs。 快速排错症状zig build刚启动就报版本错误 →原因Zig 低于 0.16.0 →解决升级 Zig 后重新执行编译命令症状Linux 构建报缺 GTK 或 blueprint-compiler →原因开发依赖没装 →解决按上面命令补装注意 blueprint-compiler 仅从 Git 检出构建才需要源码压缩包不需要症状macOS 编译报 SDK 或工具链错误 →原因选中的 Xcode 版本不对 →解决切到 Xcode 26 与 macOS 26 SDK用xcode-select --print-path复核细节见 HACKING.md更完整的配置项去官网文档翻参与贡献的规范在 CONTRIBUTING.md。现在把上面几条命令跑一遍打开属于你的第一个 Ghostty 窗口。【免费下载链接】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),仅供参考
返回列表