ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# brew ### 默认安装位置 /usr/local ### 信息查询 ``` <pre class="calibre13">``` # 查看 Homebrew 版本 ➜ <span class="token">~</span> brew <span class="token">-</span>v # 列出已安装的软件 ➜ <span class="token">~</span> brew list # 使用浏览器打开 Homebrew 官网 ➜ <span class="token">~</span> brew home # 查看包的详细信息 ➜ <span class="token">~</span> brew info 包名 # 检测系统中与Homebrew有关的潜在问题 ➜ <span class="token">~</span> brew doctor # 查看包的所有版本 ➜ <span class="token">~</span> brew list <span class="token">--</span>versions <span class="token">|</span> grep 包名 # 以树形展示所有已安装包的依赖 ➜ <span class="token">~</span> brew deps <span class="token">--</span>installed <span class="token">--</span>tree ``` ``` ### 查找软件包 ``` <pre class="calibre13">``` <span class="token">~</span> brew search git ➜ <span class="token">~</span> brew search <span class="token">/</span><span class="token">^</span>git$<span class="token">/</span> ``` ``` ### 安装软件包 ``` <pre class="calibre13">``` ➜ <span class="token">~</span> brew install 包名 ``` ``` ### 卸载软件包 ``` <pre class="calibre13">``` ➜ <span class="token">~</span> brew uninstall 包名 ``` ``` ### 自身更新 ``` <pre class="calibre13">``` ➜ <span class="token">~</span> brew update ``` ``` ### 更新包 ``` <pre class="calibre13">``` # 查看哪些包有新版本可更新 ➜ <span class="token">~</span> brew outdated # 更新所有包 ➜ <span class="token">~</span> brew upgrade # 更新指定包 ➜ <span class="token">~</span> brew upgrade 包名 ``` ``` ### 清理旧的升级包 ``` <pre class="calibre13">``` # 查看哪些包可清理 ➜ <span class="token">~</span> brew cleanup <span class="token">-</span>n # 清理所有 ➜ <span class="token">~</span> brew cleanup # 清理指定包 ➜ <span class="token">~</span> brew cleanup 包名 ``` ``` ### 锁定不想更新的包 ``` <pre class="calibre13">``` # 锁定 ➜ <span class="token">~</span> brew pin 包名 # 解锁 ➜ <span class="token">~</span> brew unpin 包名 ``` ``` ### 关联包 ``` <pre class="calibre13">``` # 清理无效的关联,且清理与之相关的位于<span class="token">/</span>Applications和<span class="token">~</span><span class="token">/</span>Applications中的无用App链接 ➜ <span class="token">~</span> brew prune # 将指定软件的安装文件symlink到Homebrew上 ➜ <span class="token">~</span> brew link 包名 ``` ``` ## 创建软连接 ln -s /Users/lu/go/bin/fresh(目标路径) /usr/local/bin/fresh(全局调用快捷键存放目录)