HomeBrew in Mac? How it simplifies Installation process with commands?


A quick guide to HomeBrew in Mac OS. How to install softwares using home brew commands. Practical examples to home brew commands

1. Introduction

In this tutorial, you will learn what is HomeBrew in Mac os and what is the list of commands of Homebrew and how it simplifies the installation process of software.

2. What is homebrew in Mac?

Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple's macOS operating system and Linux. The name is intended to suggest the idea of building software on the Mac depending on the user's taste that's why it was named HomeBrew.

You can find more software here

3. How to install the homebrew in Mac

Just open the terminal on your Mac machine and enter the following command.

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

After hitting the above command then it will prompt for the mac machine password to proceed with the installation.

-MacBook-Pro-2:Kotlin-JVM-Tutorials $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
==> This script will install:
==> The following new directories will be created:
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /usr/sbin/chown vnk /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /bin/mkdir -p /Users/vnk/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/vnk/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown vnk /Users/vnk/Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 56 (delta 33), reused 33 (delta 33), pack-reused 18
Unpacking objects: 100% (56/56), done.
From https://github.com/Homebrew/brew
 * [new branch]          dependabot/bundler/Library/Homebrew/net-http-persistent-4.0.0 -> origin/dependabot/bundler/Library/Homebrew/net-http-persistent-4.0.0
 * [new branch]          dependabot/bundler/docs/rb-fsevent-0.10.4                     -> origin/dependabot/bundler/docs/rb-fsevent-0.10.4
   e8a29a2d7..3e2039397  master                                                        -> origin/master
HEAD is now at 3e2039397 Merge pull request #7472 from MikeMcQuaid/path-tweaks
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
claws-mail                                earthly                                   fargatecli                                kumactl
==> Updated Formulae
angular-cli                 dnstwist                    graphviz                    node                        softhsm                     wtf
audacious                   efl                         gsettings-desktop-schemas   openconnect                 sonarqube                   wxmac
aws-cdk                     ejabberd                    kibana                      phpunit                     sonarqube-lts               z
azure-cli                   elasticsearch               libgr                       quickjs                     step                        zabbix
babel                       exploitdb                   libmypaint                  rebar3                      tmux
balena-cli                  flyway                      monero                      redis                       tmuxinator
ballerina                   github-release              nef                         scamper                     tmuxinator-completion
ctemplate                   glslang                     nift                        scrcpy                      vault
==> Updated Casks
anydo                       dbngin                      intellij-idea-ce            pdfpen                      sunvox                      webstorm
audio-hijack                dbvisualizer                ipfs                        pdfpenpro                   superproductivity           wechatwork
aws-vault                   drawio                      jami                        pgadmin4                    tableau                     wondershare-filmora
balenaetcher                edrawmax                    keka                        phpstorm                    tableau-public              xca
bisq                        flipper                     ledger-live                 plex-media-server           tableau-reader              youku
blocs                       fontgoggles                 listen1                     preform                     telegram                    zeebe-modeler
brave-browser               franz                       loom                        private-internet-access     tempo                       zeplin
bunqcommunity-bunq          freedom                     lyricsx                     rubymine                    termius                     zoomus
calendar-366                fs-uae                      miktex-console              saoimageds9                 tiger-trade                 zulip
camunda-modeler             gitup                       mindjet-mindmanager         screen                      ultimate
chromium                    igdm                        openbazaar                  stack-stack                 vitamin-r
datagrip                    intellij-idea               opera                       stay                        wavebox
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
No analytics data has been sent yet (or will be during this `install` run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
==> Next steps:
- Run `brew help` to get started
- Further documentation: 

4. How to know what packages are available with (home)brew?

brew search lists all available formula (aka packages), requires you to install brew first of course.

Additionally, if you want to get further information about that package before installing it brew info <package name> will list relevant information like version number, dependencies etc.

brew search | wc -l



Below example to see about ActiveMQ software info from brew:

This shows installation status and what are the requried dependencies for this.

And also gives the commands to start the active mq with command "brew services start activemq"

[MacBook-Pro-2:Kotlin-JVM-Tutorials MacBook $ brew info activemqactivemq: stable 5.15.12Apache ActiveMQ: powerful open source messaging serverhttps://activemq.apache.org/Not installedFrom: https://github.com/Homebrew/homebrew-core/blob/master/Formula/activemq.rb==> DependenciesRequired: openjdk ==> CaveatsTo have launchd start activemq now and restart at login:  brew services start activemqOr, if you don't want/need a background service you can just run:  activemq start==> Analyticsinstall: 892 (30 days), 3,250 (90 days), 11,118 (365 days)install-on-request: 850 (30 days), 3,066 (90 days), 10,562 (365 days)build-error: 0 (30 days)MacBook-Pro-2:Kotlin-JVM-Tutorials MacBook $ ]

5. Most Useful Commands

brew help will show you the list of commands that are available.

brew list will show you the list of installed packages. You can also append formulae, for example brew list Postgres will tell you of files installed by Postgres (providing it is indeed installed).

brew search <search term> will list the possible packages that you can install. brew search post will return multiple packages that are available to install that have post in their name.

brew info <package name> will display some basic information about the package in question.

6. HomeBrew Commands Cheetsheet

All the below commands are formed based on the git installations.

brew install git Install a package
brew uninstall git Remove/Uninstall a package
brew upgrade git Upgrade a package
brew unlink git Unlink
brew link git Link
brew switch git 2.5.0 Change versions
brew list --versions git See what versions you have

More package commands

brew info git List versions, caveats, etc
brew cleanup git Remove old versions
brew edit git Edit this formula
brew cat git Print this formula
brew home git Open homepage
brew search git Search for formulas

Global commands

brew update Update brew and cask
brew list List installed
brew outdated What’s due for upgrades?
brew doctor Diagnose brew issues
Brew Cask commands
brew cask install firefox Install the Firefox browser
brew cask list List installed applications

7. How to uninstall HomeBrew from Mac OS?

homebrew provides another handy command to remove the installation of HomeBrew and all other installation done in the brew but all cask installation will remain in the mac machine. These should be removed manually.

[ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"]

This command will ask for confirmation and enter y for uninstall, n for do not do.

And also it prompts for the password.

8. Conclusion

In conclusion, you have seen how to install and all commands are needed.

If you have any questions, please post in the comments section.

HomeBrew in Mac OS



About Us

Author: Venkatesh - I love to learn and share the technical stuff.

accumulo,1,ActiveMQ,2,Adsense,1,API,37,ArrayList,16,Arrays,5,Bean Creation,3,Bean Scopes,1,BiConsumer,1,Blogger Tips,1,Books,1,C Programming,1,Collection,5,Collections,21,Collector,1,Command Line,1,Compile Errors,1,Configurations,7,Constants,1,Control Statements,8,Conversions,5,Core Java,77,Corona India,1,Create,2,CSS,1,Date,3,Date Time API,4,Dictionary,1,Difference,1,Download,1,Eclipse,2,Efficiently,1,Error,1,Errors,1,Exception,1,Exceptions,3,Fast,1,Files,9,Float,1,Font,1,For examples,1,For loop examples,1,For Loop in Java,1,Form,1,Freshers,1,Function,3,Functional Interface,2,Garbage Collector,1,Generics,4,Git,4,Grant,1,Grep,1,HashMap,1,HomeBrew,2,HTML,2,HttpClient,2,Immutable,1,Inner for loops,1,Installation,1,Interview Questions,5,Iterate,2,Jackson API,3,Java,29,Java 10,1,Java 11,5,Java 12,5,Java 13,2,Java 14,2,java 5 For loop,1,Java 8,53,Java 8 Difference,2,java 8 Stream Examples,2,Java 9,1,Java Conversions,12,Java Design Patterns,1,Java Files,1,Java for loop,1,Java Program,2,Java Programs,65,java.lang,5,java.util. function,1,jQuery,1,Kotlin,10,Kotlin Conversions,3,Kotlin Programs,6,Lambda,1,lang,29,Leap Year,1,live updates,1,Logging,1,Mac OS,2,Math,1,Maven,1,Method References,1,Mockito,1,MongoDB,3,Nested for loop,1,Nested for loop examples,1,New Features,1,Operations,1,Optional,4,Oracle,5,Oracle 18C,1,Partition,1,Patterns,1,Programs,1,Property,1,Python,2,Quarkus,1,Read,1,Real Time,1,Recursion,2,Remove,2,Rest API,1,Schedules,1,Serialization,1,Servlet,1,Sorting Techniques,8,Spring,2,Spring Boot,23,Spring Email,1,Spring MVC,1,Stream,3,Streams,13,String,57,String Programs,9,String Revese,1,Swing,1,System,1,Tags,1,Threads,10,Tomcat,1,Tomcat 8,1,Troubleshoot,16,Unix,2,Updates,3,util,5,While Loop,1,
JavaProgramTo.com: HomeBrew in Mac? How it simplifies Installation process with commands?
HomeBrew in Mac? How it simplifies Installation process with commands?
A quick guide to HomeBrew in Mac OS. How to install softwares using home brew commands. Practical examples to home brew commands
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content