InfoHeap
Tech tutorials, tips, tools and more
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 Mar 20, 2016

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 a homebrew package from devel
    $ brew upgrade wget --devel
    
  8. To list info (version, installed files location, etc.) about an installed homebrew package
    $ brew info wget
    

Suggested posts:

  1. mac pkgutil – quick start guide
  2. How to install node (node.js) on Mac
  3. Composer – quick start guide on Linux and Mac
  4. Mac brew – how to find latest available package without installing
  5. Ubuntu – dpkg and apt-get beginner tutorial
  6. Mac brew – how to relink installed binaries for a package
  7. bower – installation and quick start guide
  8. haxe openfl on mac – quick start guide for mobile development
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Brew, Mac, Mac Command Line, Tutorials

Follow InfoHeap

facebook
twitter
googleplus
  • Browse site
  • Article Topics
  • Article archives
  • Recent Articles
  • Contact Us
  • Omoney
Popular Topics: AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | 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

Copyright © 2022 InfoHeap.

Powered by WordPress