ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew install *
—安装软件
brew uninstall *
—安装软件
brew list
—列出已安装的软件
brew update
—更新Homebrew
brew upgrade
—升级所有可以升级的软件们
brew outdated
—这回列出所有安装的软件里可以升级的那些
brew home *
—用浏览器打开
brew info *
—显示软件内容信息
brew deps *
— 显示包依赖
brew cleanup
—清理不需要的版本极其安装包缓存
brew server *
—启动web服务器,可通过浏览器访问http://localhost:4567/ 来管理包
brew -h
—帮助
brew search *
—查询所有版本
1、通过brew install安装应用最先是放在/usr/local/Cellar/
目录下。
2、有些应用会自动创建软链接放在/usr/bin
或者/usr/sbin
。
3、可以使用 brew list 软件名
(比如 brew list oclint
)确定安装位置。
# brew 程序本身
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
# 以下针对 mac OS 系统上的 Homebrew
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
git -C "$(brew --repo homebrew/cask-fonts)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git
git -C "$(brew --repo homebrew/cask-drivers)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-drivers.git
# 更换后测试工作是否正常
brew update
# brew 程序本身
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
# 以下针对 mac OS 系统上的 Homebrew
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
git -C "$(brew --repo homebrew/cask-fonts)" remote set-url origin https://github.com/Homebrew/homebrew-cask-fonts.git
git -C "$(brew --repo homebrew/cask-drivers)" remote set-url origin https://github.com/Homebrew/homebrew-cask-drivers.git
# 更换后测试工作是否正常
brew update