% brew, cask # 更新 brew Update brew brew update # 升级 brew Upgrade brew brew upgrade # 获取包的信息 Get info for a package brew info # 获取 cask 的信息 Get info for a cask brew cask info # 安装包 Install a package brew install # 安装 cask Install a cask brew cask install # 重新安装包 Reinstall a package brew reinstall # 重新安装 cask Reinstall a cask brew reinstall # 卸载包 Uninstall a package brew uninstall # 卸载 cask Uninstall a cask brew cask uninstall # 编辑包 Edit package brew edit # 编辑 cask Edit cask brew cask edit # 列出当前用户安装的所有服务 List all services installed by brew for the current user brew services list # 以 root 身份列出所有服务 List all services installed by brew for root sudo brew services list # 运行服务公式而不注册为登录时启动 Run the service formula without registering to launch at login brew services run # 以 root 身份运行服务公式而不注册为登录时启动 Run the service formula without registering to launch at login as root sudo brew services run # 立即启动服务公式并注册为登录时启动 Start the service formula immediately and register it to launch at login brew services start # 以 root 身份立即启动服务公式并注册为登录时启动 Start the service formula immediately and register it to launch at login as root sudo brew services start # 立即停止服务公式并取消注册为登录时启动 Stop the service formula immediately and unregister it from launching at login brew services stop # 以 root 身份立即停止服务公式并取消注册为登录时启动 Stop the service formula immediately and unregister it from launching at login as root sudo brew services stop # 停止(如有必要)并立即启动服务公式并注册为登录时启动 Stop (if necessary) and start the service formula immediately and register it to launch at login brew services restart # 以 root 身份停止(如有必要)并立即启动服务公式并注册为登录时启动 Stop (if necessary) and start the service formula immediately and register it to launch at login as root sudo brew services restart # 移除所有未使用的服务 Remove all unused services brew services cleanup # 以 root 身份移除所有未使用的服务 Remove all unused services as root sudo brew services cleanup # 自动清理 Auto cleanup brew cleanup # 链接公式 Link formula brew link # 删除链接时已存在于前缀中的文件 Delete files that already exist in the prefix while linking brew link --overwrite # 允许 keg-only 公式链接 Allow keg-only formulae to be linked brew link --force # 健康检查 Health check brew doctor # 修复权限 Fix permissions sudo chown -R $(whoami):admin /usr/local $ package: brew search $ casks: brew search --casks $ installed: brew list $ caskinstalled: brew cask list $ brewservice: brew services list | awk '{if (NR>1){printf "%s\n", $1}}'