C.W.K.
Stream
Lesson 08 of 10 · published

Homebrew 핵심

~10 min · homebrew, package, macos

Level 0창 구경꾼
0 XP0/95 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

macOS 의 사실상 패키지 매니저

Homebrew (brew) 가 macOS / Linux 에서 CLI 도구 / GUI 앱 / 폰트 설치. 거의 모든 커맨드라인 도구 — modern-tools 트랙의 ripgrep, fd, fzf, bat, eza 등 — 의 최소 저항 경로.

한 번 설치

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

이어서 ~/.zprofile 에:

eval "$(/opt/homebrew/bin/brew shellenv)"

일상 command

  • brew install jq — CLI 도구 (formula) 설치.
  • brew install --cask iterm2 — GUI 앱 (cask) 설치.
  • brew uninstall jq
  • brew update — formula 목록 갱신.
  • brew upgrade — 다 업그레이드.
  • brew list — 설치 목록.
  • brew leaves — 최상위만 (의존 없음).
  • brew info jq — 버전, 의존, caveat.
  • brew search ripgrep — formula 검색.
  • brew doctor — 진단.

Brewfile — 재현 가능 설치

brew bundle dump --file=Brewfile 가 모든 formula / cask 목록 저장. brew bundle install --file=Brewfile 가 새 Mac 에서 동일 세트 복원. 한 줄 Mac 셋업 도구.

Services

brew services list 가 brew 가 관리하는 장기 실행 서비스 (postgres, redis 등) 표시. brew services start postgresql 가 launchd plist 까지 자동. 중지는 brew services stop.

Code

Mac 첫 날 셋업 패턴·bash
# Save your current set
brew bundle dump --file=~/Brewfile
# Restore on a new Mac
brew bundle install --file=~/Brewfile
# Inspect a tool before installing
brew info ripgrep

External links

Exercise

brew leaves > ~/my-brew-leaves.txt. 읽기. 이어서 brew bundle dump --file=~/Brewfile. Brewfile 열어 brew / cask / tap / mas 항목 확인. 이게 너의 Mac 인벤토리.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.