How does MacOS use the Package Manager homebrew-cask to install software?

Source: Internet
Author: User
Tags brew cask

This article tags: Mac efficiency tools mac gadget MacOS homebrew-cask Mac Package Manager Introduction to package Management

The Apple system combines the Windows graphical interface with the Linux command line, and now the developers are exclusively with the Mac.

Linux system installation, update software is very convenient, except I feel that some people with the CentOS system also like the old trilogy : Download, compile, install. Most people are more accustomed to installing software based on package management systems, and of course updating and removing software is also done with a package management system.

Mac System Package management is not like Linux is brought by the operating system, MAC official default does not provide such a package management system. (Windows Also, you think every time the installation of Windows program is more troublesome, but also easy to download to a virus-infected program; several download sites in the country mainly provide Windows EXE image, wipe, burst age)

As a long-term Linux system people should be more accustomed to using package management to install, update software packages, Mac is the most popular should be Homebrew.


The following line of commands installs the homebrew:

$ /usr/bin/ruby -e "$(curl -fsSL"
Homebrew Common Commands

Command line Software Management:

$ brew search wget  # 搜索软件$ brew info wget    # 查看软件信息$ brew install wget  # 安装 wget$ brew list wget    # 列出该软件安装后的文件$ brew uninstall wget  # 卸载 wget

Official website:

Homebrew-cask extends Homebrew and brings its elegance, simplicity, and speed to MacOS applications and large binaries Ali Ke.

It is takes 1 line in your shell to reach 3624 casks maintained by 4493 contributors.

Caskroom Software Management:

Get Homebrew-cask

$ brew tap caskroom/cask

Common commands:

# brew cask 和 brew 的命令基本一致,search, info, list, install, uninstall 子命令都一样$ brew cask install java  # 安装 Java$ brew cask uninstall java  # 卸载 Java
Homebrew Installed software Updates

brew installSoftware can be updated with the following command:

$ brew update && brew upgrade && brew cleanup
    • brew update: Update Homebrew
    • brew upgrade: Complete the installed command-line software update
    • brew cleanup: Remove old version software
Homebrew-cask Installed software Updates

I will try to install GUI software as much as possible, such as:,,,, and brew cask install java google-chrome vlc sublime-text postman eclipse-jee so on.

But brew cask install the installed software is not easy to update with a command, so I use the following script update:

$ cat ~/bin/!/bin/bashred=$(tput setaf 1)# green=$(tput setaf 2)reset=$(tput sgr0)(set -x; brew update;)for cask in $(brew cask outdated | awk ‘{print $1}‘)do    echo "${red}update ${cask} ...${reset}."    # (set -x; brew cask reinstall "$cask";)    (set -x; brew cask install --force "$cask";)doneecho "${red}brew clean up ...${reset}"(set -x; brew cleanup;)(set -x; brew cask cleanup;)echo "${red}brew clean up done.${reset}"


    • brew cask outdatedList the software that needs to be updated
    • brew cask install --force <outdated-cask>Update Software

In fact, the following sentence can also be done:

$ brew cask install --force $(brew cask outdated | awk ‘{print $1}‘ | xargs)

It is recommended to use homebrew, and do not manually download and install DMG files as far as possible.

written at the end: for Freedom look outside the world, and it this line, not to go to Google data, finally, Amway some speed agent.

Accelerator recommendations Free Solutions Payment Plan Official website
A Red apricot accelerator Free program is not available, stable high-speed Enter 80 percent coupon code WH80, annual pay only 80 yuan/year Official website Direct HTTP://WHOSMALL.COM/GO/YZHX
Azumino Accelerator Best use of foreign trade VPN Minimum ¥30/Month Official website Direct Http://
Loco Accelerator Free 2 hours per day Minimum ¥15/Month Official website Direct Http://

This article tags: Mac efficiency tools mac gadget MacOS homebrew-cask Mac Package Manager

Turn from SUN's BLOG-focus on Internet knowledge, share the spirit of the Internet!

Original Address : How does MacOS use the Package Manager homebrew-cask to install software? "

Related reading : How can I use Launchbar to download all the files on a webpage on MAC? "

Related reading : How does MacOS use Launchbar to upload files to Google drive? "

Related reading : " best Mac App Quick Start and Switch tool: Manico 2.0"

Related reading : Why do I choose Window Tidy as the MacOS split-screen tool? "

Related reading : Chrome extension Stylish: "Skin-changing" with one click to not like a website

Related reading : "Integrating QQ music, NetEase cloud music and shrimp music resources" with chrome extension listen 1 "

Related reading : "8" new tab "chrome Extensions: teach you to play the New tab page with a sneak "

Related reading : "7 Practical Chrome Extensions recommended: help you improve your chrome experience "

Related reading : " no extension is not Chrome: 15 Premium Chrome Extensions recommended for everyone "

Related reading : thebest experience for Web browsing with 12 no less chrome extensions

Related reading : "5 Chrome extensions that bring happiness "

Related reading: useful for programmers: 2017 latest in Google's Hosts file download and summary of the various hosts encountered the problem of the solution and configuration of the detailed

Related blog:SUN's blog -focus on Internet knowledge, share the spirit of the Internet! Go and

Original address:

How does MacOS use the Package Manager homebrew-cask to install software?

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: 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.