본문 바로가기
OS/Mac OSX

[Mac] Homebrew

by llHoYall 2020. 9. 23.

※ 09/23/2020

 

Homebrew is a package manager for Mac.

When you use Homebrew, you will see the formula, it is a simple Ruby script.

cask

This is an extension of Homebrew. It helps to install and manage GUI Mac applications.

mas

This is a simple command-line interface for the Mac App Store.

Installation

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

cask

Embedded in the Homebrew.

$ brew tap homebrew/cask-drivers

mas

$ brew install mas

Usage

Help

$ brew help [command]

Show List of Installed Programs

$ brew list
$ brew list --cask

Search Programs from Online

$ brew search <programs>
$ brew search --cask <programs>

Install Specific Programs

$ brew install <programs>
$ brew install --cask <programs>

Uninstall Specific Programs

$ brew uninstall <programs>

# Force uninstall, even if it depends on other packages
$ brew uninstall --ignore-dependencies <programs>

Update and Upgrade the Installed Programs

$ brew update
$ brew upgrade [prgrams]

Symlink all of the formula's installed files into Homebrew's prefix

$ brew link --overwrite <formula>

In other words, make a symlink in /usr/local/bin folder.

mas

You can get the list of installed programs

$ mas list

You can get the ID of specified programs.

$ mas search <programs>

You can install programs.

$ mas install <ID>

You can purchase the programs.

$ mas purchase <ID>

You can upgrade the installed programs.

$ mas upgrade [ID]

You can signin or signout of Mac App Store.

$ mas signin <apple account>
$ mas signout <apple account>

Brewfile

After you save the list of applications you want to install on Brewfile, you can install them at once.

This is an example of Brewfile.

# Brewfile
brew "mas"
brew "git
cask "google-chrome"
cask "docker"
mas "KakaoTalk", id: 869223134

After moving to the folder where Brewfile is stored, enter the following command to install it.

$ brew bundle

To save applications currently installed on Mac as BrewFile, enter the following command.

$ brew bundle dump

'OS > Mac OSX' 카테고리의 다른 글

[Mac] Configuration for Development  (0) 2020.09.26
[Mac] Shell Configuration (feat. zsh)  (0) 2020.09.25
[Mac] Change Colors of ls Command  (0) 2020.09.25
[Mac] Terminal Configuration with iTerm2  (0) 2020.09.24
[Mac] Cheatsheet  (0) 2020.09.22

댓글