Homebrew is the package manager for OS X, similar to yum on CentOS or apt-get on Ubuntu. From the OS X command line you can install applications with the brew and brew cask commands.
1. Install brew cask
1
| brew install brew-cask-completion
|
2. The Difference Between brew and brew cask
The difference between brew and brew cask lies in the type of application they favor. brew leans toward developers and mainly installs command-line tools; brew cask leans toward everyday users and mainly installs GUI applications.
In terms of usage there is not much difference between the two β you can basically just substitute brew cask for brew. See the help for details.
3. brew Create, Read, Update, Delete
1
| brew uninstall <AppName>
|
Use unpin to release the pin
4. brew Day-to-Day Maintenance
- Clean up downloaded packages
5. Disabling the Update Before Installation
If you have not set up a proxy or switched mirrors, the update before installation can be very slow or even hang. The command below disables Homebrew’s pre-install update:
1
| export HOMEBREW_NO_AUTO_UPDATE=true
|
6. Switching brew Mirrors
1
2
3
4
5
6
7
8
9
| cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
# git remote set-url origin https://github.com/Homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
# git remote set-url origin https://github.com/Homebrew/homebrew-core
brew update
|