brew --version 是检查软件是否安装成功的基本且最简单的方法。
$ brew --version
Homebrew 3.2.17-108-ge518ea4
Homebrew/homebrew-core (git revision 4eaec4244d4; last commit 2021-10-21)
Homebrew/homebrew-cask (git revision 4d10ee7007; last commit 2021-10-22)
对于brew 命令,您可以运行帮助以了解可以尝试的更多选项,例如
$ brew search --help
Usage: brew search, -S [options] text|/regex/ [...]
Perform a substring search of cask tokens and formula names for text. If
text is flanked by slashes, it is interpreted as a regular expression. The
search for text is extended online to homebrew/core and homebrew/cask.
--formula, --formulae Search online and locally for formulae.
--cask, --casks Search online and locally for casks.
--desc Search for formulae with a description
matching text and casks with a name
matching text.
--pull-request Search for GitHub pull requests containing
text.
--open Search for only open GitHub pull requests.
--closed Search for only closed GitHub pull
requests.
--repology Search for text in the given database.
--macports Search for text in the given database.
--fink Search for text in the given database.
--opensuse Search for text in the given database.
--fedora Search for text in the given database.
--archlinux Search for text in the given database.
--debian Search for text in the given database.
--ubuntu Search for text in the given database.
-d, --debug Display any debugging information.
-q, --quiet Make some output more quiet.
-v, --verbose Make some output more verbose.
-h, --help Show this message.
比如我要安装go,我可以做brew search go:
$ brew search node
==> Formulae
heroku/brew/heroku-node ✔ node ✔ node@10 node_exporter nodenv
libbitcoin-node node-build node@12 nodebrew ode
llnode node-sass node@14 nodeenv
==> Casks
font-ubuntu-mono-derivative-powerline nodebox nodeclipse
nodebox nodeclipse
If you meant "node" specifically:
It was migrated from homebrew/cask to homebrew/core.