Terry : Linuxbrew


Linuxbrew is an experimental fork of Homebrew for Linux.



Debian / Ubuntu

sudo apt-get install build-essential curl git
# Or to be safer on a base install
sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev

Fedora / CentOS / Oracle Linux / RHEL

yum groupinstall 'Development Tools' && yum install curl git m4 ruby texinfo bzip2-devel curl-devel expat-devel ncurses-devel zlib-devel



  • Ruby 1.8.6 or newer
  • GCC 4.2 or newer

 Clone the repo from GitHub

git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew

Add the following in ~/.bashrc

# set path for Linuxbrew
if [ -d "$HOME/.linuxbrew" ]; then
    export PATH=$HOME/.linuxbrew/bin:$PATH
    export LD_LIBRARY_PATH=$HOME/.linuxbrew/lib


 brew command

$ brew
Example usage:
  brew [info | home | options ] [FORMULA...]
  brew install FORMULA...
  brew uninstall FORMULA...
  brew search [foo]
  brew list [FORMULA...]
  brew update
  brew upgrade [FORMULA...]
  brew doctor
  brew install -vd FORMULA
  brew [--env | --config]
  brew create [URL [--no-fetch]]
  brew edit [FORMULA...]
  open https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
Further help:
  man brew
  brew home


Terminology Homebrew speaks

FormulaThe package description~/.linuxbrew/Library/Formula
KegThe installation prefix of a Formula~/.linuxbrew/Cellar/tmux/1.8
CellarAll kegs are installed in here~/.linuxbrew/Cellar
TapAn optional repository (git) of Formula~/.linuxbrew/Library/Taps
BottlePre-built (binary) Keg that can be unpackedqt-4.8.4.mountain_lion.bottle.1.tar.gz

NOTE: More general: brew --prefix and brew --repository instead of ~/.linuxbrew (Linuxbrew) or /usr/local (OS X homebrew) but let's KISS.


Install tmux

The Formula takes care of most ependencies, e.g. pkg-config, libevent.

 NOTE: see ~/.linuxbrew/Cellar directory for details.

However, it's missing libncurses5-dev package to compile tmux on Ubuntu/Debian. Install the pacakge and run

# Install
$ brew install tmux
==> Downloading http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.8/tmux
Already downloaded: /home/terry/.cache/Homebrew/tmux-1.8.tar.gz
==> Patching
patching file osdep-darwin.c
patching file utf8.c
==> ./configure --prefix=/home/terry/.linuxbrew/Cellar/tmux/1.8 --sysconfdir=/ho
==> make install
==> Caveats
Exmample configurations have been installed to:
Bash completion has been installed to:
==> Summary
/home/terry/.linuxbrew/Cellar/tmux/1.8: 14 files, 736K, built in 10 seconds

# tmux 1.8 ;-)
$ tmux -V
tmux 1.8
$ brew info tmux
tmux: stable 1.8, HEAD
/home/terry/.linuxbrew/Cellar/tmux/1.8 (14 files, 736K) *
  Built from source
From: https://github.com//homebrew/commits/master/Library/Formula/tmux.rb
==> Dependencies
Build: pkg-config
Required: libevent
==> Caveats
Exmample configurations have been installed to:
Bash completion has been installed to:

# list installed formula
$ brew list
libevent  pkg-config  tmux

# use the tmux from linuxbrew resides in $HOME
$ which tmux


NOTE: Linuxbrew Cache directory ~/.cache/Homebrew


Linuxbrew https://github.com/Homebrew/linuxbrew

Formula Cookbook https://github.com/mxcl/homebrew/wiki/Formula-Cookbook