Installing Drush 8 in ubuntu 16.04 I am having problems installing drush 8 in ubuntu 16.04. when i insert the following command in the terminal

composer global require drush/drush:dev-master


i get the following error


I have also tried the documentation from drush.org

php -r "readfile('https://s3.amazonaws.com/files.drush.org/drush.phar');" &gt; drush


but i get the following error msg


  bash: drush: Is a directory


I am currently stuck.
drush/drush:dev-master is not Drush 8, it is Drush 9.  To install Drush 8, try composer global require drush/drush, or better yet, use cgr.

For notes on installing Drush 9 via Composer, please see drush dev-master requires codegyre-robo.