A detailed description of the required brew usage for MacOS developers

Source: Internet
Author: User
Tags homebrew cask brew cask
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

    • Bash
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profilesource ~/.bash_profile
    • Zsh
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

    • Replace with USTC Mirror
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
    • Zsh using a binary image
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.

    • such as installing wget
# 建议单独安装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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.