InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Brew tutorials

  • Mac brew (homebrew) - quick start guide
  • Mac brew - how to find latest available package without installing
  • Mac brew - how to relink installed binaries for a package
 
  • Home
  • > Tutorials
  • > Mac
  • > Brew

Mac brew (homebrew) – quick start guide

By admin | Last updated on Dec 11, 2022

Many command line tools (e.g. wget, pstree) don’t come pre-installed on Mac. Homebrew is one of the easiest ways to install and manage these missing packages on Mac. Homebrew is written mostly in ruby. the brew command itself is a shell wrapper over ruby code. This article is a quick start guide for using homebrew on mac.

home-brew-missing-package-manager-osx

Installing Homebrew

These are the steps to install homebrew:

  1. Install Xcode on your Mac. Easiest way to install it using App store (look for applciation “App Store” in application finder). You will need an appleid for installing Xcode from App Store. The download is more than a GB and it may take few hours. Here is how Xcode package looks like in App store.
    mac-app-store-xcode-installing
  2. Install homebrew using one liner instructions mentioned at homebrew home page. This is the command to install it at the time of writing this article.
    ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

    You may want to double check for any potential update in the command. The command will download and execute the ruby install script. After the install, the brew wrapper is placed at /usr/local/bin/brew and ruby files at /usr/local/Library/brew.rb and /usr/local/Library/Homebrew/

Using homebrew

These are some handy commands using brew:

  1. Install some useful packages like wget, node.js, etc.
    $ brew install wget
    $ brew install node
    $ brew install pstree
    

    Brew uses a formula file written in ruby which contains compile/install rules for the package. Some of the formulas can be see at homebrew github formulas site. These packages are installed at /usr/local/Cellar/.

  2. To list all homebrew installed packages
    $ brew list
    
  3. To list all files of an installed packages
    $ brew list --verbose wget
    // or 
    $ brew list -v wget
    
  4. To uninstall a homebrew package
    $ brew uninstall wget
    
  5. To update a homebrew itself
    $ brew update
    
  6. To upgrade a homebrew package
    $ brew upgrade wget
    
  7. To upgrade all installed homebrew packages
    $ brew upgrade
    
  8. To upgrade a homebrew package from devel
    $ brew upgrade wget --devel
    
  9. To list info (version, installed files location, etc.) about an installed homebrew package
    $ brew info wget
    
  10. To list all outdated packages
    $ brew outdated
    

Suggested posts:

  1. Android chrome – create website bookmark on home screen
  2. HTML import
  3. CSS max-width – limit maximum wodth of an element
  4. bower – installation and quick start guide
  5. How to install Imagemagick on Mac
  6. bash – how to use regex in if condition
  7. CSS flex-basis
  8. Git – how to undo last commit
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Brew, Mac, Mac Command Line, Tutorials
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress