[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f3eu0n7ekejc95":3},{"type":4,"solution":5},"solution",{"slug":6,"platform":7,"title":8,"description":9,"risk":10,"categorySlug":11,"tags":12,"verifiedAt":19,"updatedAt":19,"categoryName":20,"command":21,"undoCommand":22,"directAnswer":23,"explanation":24,"warning":22,"seoTitle":25,"seoDescription":26,"requirements":22,"macosSupport":27,"sources":28,"related":35},"install-xcode-command-line-tools","macos","安装 Xcode Command Line Tools","不装完整版 Xcode，获得 git、clang 等开发工具。","low","developer",[13,16],{"slug":14,"name":15},"xcode","Xcode",{"slug":17,"name":18},"terminal","终端","2025-11-14T00:00:00.000Z","开发者","xcode-select --install",null,"运行下面的命令，在弹出的对话框中点“安装”。下载需几分钟，完成后即可使用 git 和 clang。","很多开发工具（git、make、clang、Homebrew 的前置条件）都依赖 Apple 的编译工具链。这条命令只安装 Command Line Tools（约 1–2 GB），不需要完整的 Xcode IDE，并通过 xcode-select 注册为默认开发者目录。","Mac 安装 Xcode Command Line Tools — 终端命令","用一条终端命令在 macOS 安装 Apple 命令行工具（git、clang、make），无需完整 Xcode。","macOS 10.11 El Capitan – 15 Sequoia",[29],{"url":30,"title":31,"publisher":32,"sourceType":33,"evidence":34,"retrievedAt":19},"https:\u002F\u002Fdeveloper.apple.com\u002Flibrary\u002Farchive\u002Ftechnotes\u002Ftn2339\u002F_index.html","TN2339: Building from the Command Line with Xcode","Apple","apple-doc","xcode-select --install opens a dialog to install the Command Line Tools package.",[36,51,62],{"slug":37,"platform":7,"title":38,"description":39,"risk":40,"categorySlug":41,"tags":42,"verifiedAt":50,"updatedAt":50},"flush-dns-cache","清除 Mac 的 DNS 缓存","网站解析到旧 IP 时，清空 macOS 的 DNS 缓存。","medium","network",[43,46,49],{"slug":44,"name":45},"dns","DNS",{"slug":47,"name":48},"diagnostics","诊断",{"slug":17,"name":18},"2025-11-18T00:00:00.000Z",{"slug":52,"platform":7,"title":53,"description":54,"risk":10,"categorySlug":55,"tags":56,"verifiedAt":61,"updatedAt":61},"prevent-sleep-temporarily","让 Mac 暂时不休眠一小时","临时阻止 macOS 进入睡眠，无需改动节能设置。","system",[57,60],{"slug":58,"name":59},"power","电源与睡眠",{"slug":17,"name":18},"2025-11-12T00:00:00.000Z",{"slug":63,"platform":7,"title":64,"description":65,"risk":10,"categorySlug":66,"tags":67,"verifiedAt":74,"updatedAt":74},"compress-folder-zip","在 Mac 终端把文件夹压缩为 zip","用系统自带 ditto 命令创建干净的 zip 压缩包，保留 macOS 元数据。","files",[68,71,72],{"slug":69,"name":70},"zip","压缩与归档",{"slug":17,"name":18},{"slug":66,"name":73},"文件","2025-11-08T00:00:00.000Z"]