Homebrew (brew)笔记

Homebrew / brew是什么?

类似Ubuntu的apt-get,Fedora的yum,brew是Mac OS用的命令行安装,卸载软件工具。

Brew 命令

查看已经安装的软件包(package)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
brew list
brew list --version
brew list brew list --version
brew list
brew list --version

这里会有不少package是安装某package和安装的dependency。

查看top level packages

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
brew leaves
brew leaves
brew leaves

显示每个package的description

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
brew leaves | xargs -n1 brew desc
brew list | xargs -n1 brew desc
brew leaves | xargs -n1 brew desc brew list | xargs -n1 brew desc
brew leaves | xargs -n1 brew desc
brew list | xargs -n1 brew desc

列出已经安装package的dependency tree

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
brew deps --tree --installed
brew deps --tree --installed
brew deps --tree --installed

显示需要更新的packages

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
brew outdated
brew outdated
brew outdated

查看Homebrew版本

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
brew -v
brew -v
brew -v

Homebrew安装的软件都放在哪里?

目前用的是Homebrew 3.6.12,软件安装在

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
/usr/local/Cellar
/usr/local/Cellar
/usr/local/Cellar

参考

本文链接

Leave a Comment

Your email address will not be published.