HomeBrew
HomeBrew
refer 文档
# brew
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
# 从本镜像下载安装脚本并安装 Homebrew / Linuxbrew
git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install
/bin/bash brew-install/install.sh
rm -rf brew-install
常用命令:
# 更新git
brew install git
brew link git --overwrite
# brew unlink git
# 服务列表
brew services list
# 查看已安装版本
ls /usr/local/Cellar/ansible
# 查看某软件更多信息
brew info ansible
# 清理旧版本
brew update && brew upgrade && brew cleanup
# 清理cask
brew cask cleanup