If you are on Mac and need to install some package or software, the changes you came across Homebrew are about 99%.
Homebrew is a package manager for Mac. It makes it easy to install different software. Or even different versions of, for instance, PHP.
You use homebrew in your terminal, my favorite terminal is iTerm2.
Installing homebrew on Mac
The installation is one of the easiest Iβve ever seen.
Open up your terminal and execute the following command.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
That will install the latest version of homebrew.
Using homebrew
To use homebrew, you can again open your terminal and run brew
commands.
A list of useful commands:
brew --version
: Display the installed version of homebrewbrew help
: Display the helpbrew doctor
: Check the system for potential issuesbrew update
: Fetch the latest homebrew versionbrew upgrade
: Upgrade all brews (packages)brew list
: List all installed packagesbrew install <formulae>
: install specific formulabrew services start <service>
: Start a specific service
Installing specific packages
To install specific packages, we can generally follow the following guide.
Note: this example uses httpd as the package. You can find all homebrew formulae here
brew install httpd
Done⦠Just that one command will install httpd and everything it needs.
Since itβs a service, we can use homebrew to start it.
brew services start httpd
Amazing right!
If you are on Mac and not running homebrew, make the change today, it will change your life!
Thank you for reading, and letβs connect!
Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter