This is a creation in Article, where the information may have evolved or changed.
Installing Brew
Brew's official website: http://brew.sh
The use of brew is described in detail on the official website.
Open termal: Enter command in Mac:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Installation process Agent http://www.jianshu.com/p/6523d3eee50d
Brew Domestic Agent
Zhong Ke Mirroring
Core Core
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
Reset to official Address
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"git remote set-url origin https://github.com/Homebrew/homebrew-core
Http://mirrors.ustc.edu.cn/help/homebrew-core.git.html
binary files
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profilesource ~/.bash_profile
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrcsource ~/.zshrc
Http://mirrors.ustc.edu.cn/help/homebrew-bottles.html
Homebrew Cask Software Warehouse
Provides MacOS apps and large binaries, first use requires execution
brew cask list
Http://mirrors.ustc.edu.cn/help/homebrew-cask.git.html
cd "$(brew --repo)"/Library/Taps/caskroom/homebrew-caskgit remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
- Reset to official Address
cd "$(brew --repo)"/Library/Taps/caskroom/homebrew-caskgit remote set-url origin https://github.com/caskroom/homebrew-cask
Tsinghua University Mirror
https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
Unintelligible
http://ban.ninja/
- binary files using Mirrored bash
echo 'export HOMEBREW_BOTTLE_DOMAIN=http://7xkcej.dl1.z0.glb.clouddn.com' >> ~/.bash_profilesource ~/.bash_profile
echo 'export HOMEBREW_BOTTLE_DOMAIN=http://7xkcej.dl1.z0.glb.clouddn.com' >> ~/.zshrcsource ~/.zshrc
Brew Use
Using Brew query Software
Sometimes you don't know the name of the software you're installing, then you need to search for the name of the package first.
Like I'm going to install Golang.
brew search golang# /wge*/是个正则表达式, 需要包含在/中brew search /wge*/
Use Brew to query software details
brew info autojump
A lot of software is installed, it is in info to explain how to use, such as AutoJump
Using Brew to install software
A command is done, like installing Git.
# 建议单独安装git这样可以在更新某些软件的时候,git一直可用brew install gitbrew install wget
Uninstalling Software with Brew
brew uninstall wget
Soft-chain Software environment variables
- General software has a soft chain, but a lot of it does not do the soft chain, users need to configure
brew link gradle@2.14brew unlink gradle@2.14
Other Brew commands
command name |
purpose |
Brew list |
lists Installed software |
Brew update |
update brew |
Brew Home |
open bre with browser Official website of W |
brew deps |
Show package dependencies |
Brew list Redis |
view Red is installation file |
brew cat Redis |
View the Brew installation script for Redis |
Brew cleanup |
Remove Legacy legacy versions after all software upgrades |