Posted :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
brew analytics # Displays analytics state, with UUID
brew analytics on # Turns analytics On
brew analytics off # Turns analytics Off
brew commands # The available brew commands
brew
help
analytics
# Shows help
about the analytics command
brew doctor
brew --config
brew
shellenv
# Output environment variables exports,
that can be added to your
shell profile,
for example
~/.profile, ~/.bash_profile, or
~/.zprofile, by inserting into
any of them: eval $(brew shellenv)
brew --cache # Where things get downloaded
brew
--caskroom
# Path of the caskroom,
a cask is a recipe for installing
a GUI.app macos application
, so this is a path containing
metadata about the casks
that you have installed.
brew
--cellar
# Brew is used
to install Unix applications,
a cellar is where all Unix
applications are installed.
brew
--env
# Brew build environment:
for example the used gcc compiler...
brew
--repository
# The path on the
local machine, where the brew repository
is synced.
brew
--repository
user/repo
# The path on the local machine,
where a repository containing,
recipes for installing Unix applications,
or a GUI.app macOS applications, is synced
brew --repository homebrew/homebrew-cask # Example
brew --repository homebrew/cask # Example
brew
update
# To install software,
brew uses formulas, and casks,
located on Git repositories,
synced to your local machine.
A formula, is a recipe for installing
a Unix application.
A cask, is a recipe for installing
GUI.app macOS applications.
So this will update brew,
the formulas, and the casks.
brew
tap
# List repositories,
you are syncing recipes,
for installing, Unix, and
GUI.app macOS applications, from.
brew
tap
homebrew/homebrew-cask
# Adds the Git repository,
homebrew-cask, which can also be referred
using cask, since homebrew-, in the repository
name can be dismissed, and which belongs to
the user homebrew, as a locally synced source
of recipes, from which applications can be installed.
brew
tap
user/repo URL
# In this case,
you must additionally specify,
the URL of the GIT repository,
to be synced.
brew
untap
homebrew/cask-versions
# Remove a repository
from being synced,
as a source of recipes,
usable for software installation.
brew
list
# List the installed applications,
so the installed formulas, which are the
Unix applications, and casks, which are
the GUI.app, macOS applications.
brew formulae # List locally available to install formulas
brew casks # List locally available to install casks
brew
search
name_any
# Search the names,
of locally available to install,
formulas, and casks, if any
contains name_any. Additionally,
the search is extended online, to
homebrew/core, and homebrew/cask
brew
search
/regular_expression/
# Same as
brew search name_any,
but a regular expression,
as in /n.n/, is used instead.
brew
fetch
package_name
# Fetch casks
and formulas binaries. If a
formula does not have a binary,
fetch its source packages.
brew
install
nginx
# Install or upgrade
nginx, from the homebrew/core
repo.
brew
install
username/repo/nginx
#
Install or upgrade nginx,
from the username/repo
repo.
brew
install
username/repo/nginx
--with-modsecurity
#
Install or upgrade nginx,
from a thrid party repo
passing in, compilation
options.
brew
install
tree google-chrome
# Install or
upgrade, tree and rmate.
brew
options
nginx
# View nginx
formula installation optionss.
brew
desc
nginx
# One line
description of formula.
brew
homepage
google-chrome
# Visit
google chrome homepage.
brew
deps
google-chrome
# Show the
dependencies of the
google-chrome cask.
[sudo]
brew
services
run
formula
# Run
the application in the
background. For example,
brew services run nginx
runs nginx as the current user,
and:
sudo brew services run nginx,
runs nginx as the root user.
[sudo]
brew
services
start
formula
# Run
the application in the
background, and register
it, to start at login.
[sudo]
brew
services
stop
formula
# Stop
the application, and
remove it from starting
at login.
[sudo]
brew
services
restart
formula
# Stop
the application if running,
run it in the background,
and register it to start at login.
[sudo]
brew
services
# List the
managed services, for the user.
[sudo]
brew
services
cleanup
# Remove
unused services.
brew
upgrade
# Upgrade all
installed casks and formulas,
which have a newer version.
brew
upgrade
adobe-air
# Upgrade
adobe-air, if it has, a newer
version.
brew
pin
mysql
# Forbid
the mysql application,
from being upgraded, by
the brew upgrade command
brew
unpin
mysql
# Allow
the mysql application,
to be upgraded.
brew
uninstall
atom
# Uninstall
the atom cask.
brew
uses
zlib
# Show the
casks, and formulas, that
require the zlib formula,
to be installed.
brew
leaves
# Show casks,
and formulas, which are
installed,and which are
not dependencies, to
other formulas.
brew
leaves
--installed-on-request
# Show
leaves, installed on request.
brew
leaves
--installed-as-dependency
# Show
leaves, installed, as being
part of a dependency.
brew
autoremove
# Remove
formulas, which were installed,
as being part of a required
dependency, and are not
needed anymore.
brew
cleanup
# Remove
stale lock, and downloaded
files, for a formula, or a cask,
and remove old versions,
of a formula.