mac homebrew

As a loyal fan of Linux system, I have used Ubuntu and Centos, apt package management and Yum package management, which are very convenient.

After switching to mac, although Mac has App Store, as a development, I still prefer to use the command line tool.

So found it.


What is Homebrew?

Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with OS X. 

Homebrew is a package manager for installing UNIX tools (such as the famous wget) that OS X does not have on Mac.

Homebrew installs all these tools in the /usr/local/Cellar directory, creates symbolic links in /usr/local/bin, and configures the directory in /usr/local/etc.

Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL"

Example usage:

  brew search [TEXT|/REGEX/]    #Search software
  brew info [FORMULA...]        #View software information
  brew install FORMULA...       #Install software
  brew options FORMULA...       #Display install options specific to formula 
  brew update                   #Update brew installable package
  brew upgrade [FORMULA...]     #Upgrade software
  brew uninstall FORMULA...     #Uninstall software
  brew list [FORMULA...]        #View a list of installed software
  brew tap [options] user/repo [URL] #List all installed taps when no arguments are passed.
  brew services list            #List all running services
  brew services cleanup         #Remove all unused services.
  brew services restart FORMULA...   #restart formula

More details:

➜  ~ man brew

➜  ~ brew --help

➜  ~ brew services --help

➜  ~ brew tap --help

Use example:

➜  ~ brew install wget
➜  ~ which wget
➜  ~ ll /usr/local/Cellar/wget
total 0
drwxr-xr-x  12 ylspirit  staff   384B Apr 19 21:09 1.20.3

What Does Homebrew Do?

See the homebrew website for details.

Homebrew Cask

Homebrew Cask is an extension of Homebrew, with which we can easily install graphical interface programs on macOS, that is, all kinds of common applications.

➜  ~ brew cask --help
Homebrew Cask provides a friendly CLI workflow for the administration
of macOS applications distributed as binaries.


    audit      verifies installability of Casks
    cat        dump raw source of the given Cask to the standard output
    create     creates the given Cask and opens it in an editor
    doctor     checks for configuration issues
    edit       edits the given Cask
    fetch      downloads remote application files to local cache
    home       opens the homepage of the given Cask
    info       displays information about the given Cask
    install    installs the given Cask
    list       with no args, lists installed Casks; given installed Casks, lists staged files
    outdated   list the outdated installed Casks
    reinstall  reinstalls the given Cask
    style      checks Cask style using RuboCop
    uninstall  uninstalls the given Cask
    upgrade    upgrades all outdated casks
    zap        zaps all files associated with the given Cask

See also "man brew-cask"

Add a Comment

Your email address will not be published. Required fields are marked *