Install Drush 8

You will need drush 8 and drush 7 to work with Drupal 8 and with Drupal 7.

This requires composer already installed.

Install

mkdir ~/drush8
cd ~/drush8
composer require drush/drush:8.x

You may have drush 7 already installed. If not, then

mkdir ~/drush7
cd ~/drush7
composer require drush/drush:7.x

 

Update aliases

In .bash_aliases add

#alias drush7='~/drush7/vendor/bin/drush'
alias drush8='~/drush8/vendor/bin/drush'

Uncomment the drush7 alias if you need it.

and source your .bash_rc file

source .bash_rc