Here are some commands for installing drush from the command line
sudo apt-get install php-pear
pear channel-discover pear.drush.org
pear install drush/drush
pear upgrade drush/drush
But this is the new preferred way using Composer on *nix
# install composer
curl -sS https://getcomposer.org/installer | php -- --install-dir=bin --filename=composer
# You may need to mkdir ~/bin first if you don't have one.
#move it global
sudo mv ~/bin/composer /usr/local/bin/composer
#make your bin path known Substitute bashrc if you are using bash.
echo "PATH=$HOME/bin:$PATH" >> ~/.zshrc
# Get drush
composer global require 'drush/drush:6.*'
If it worked,
drush at the command line should spit back a bunch of help.
Install coder to support drush
composer global require drupal/coder:\>7
drush pm-download coder --destination=$HOME/.drush
composer global require squizlabs/PHP_CodeSniffer:\<2
Install dcq for precommit hooks style review
drush dl dcq
Now go to any drupal site that is git controlled and run
drush dcq and you should see a message like
"Installed pre-commit hooks in ... "
Now whenever you make a commit of files on that reopository, code quality review will take place and interrupt the commit if there are issues. Just remember, if it finds issues and you fix them, you will need to git add them right after you fix the last issue, or the commit will just include your faulty work.