1. To install Drupal8.4+ you need to install drush 9. You can easily install it using composer.
[sourcecode language=”bash”] composer require drush/drush
[/sourcecode] 2. To be able to call drush from anywhere, you need to install the Drush Launcher by downloading – Phar file from https://github.com/drush-ops/drush-launcher/releases/latest.
[sourcecode language=”bash”] wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.5.1/drush.phar
[/sourcecode] 3. Make downloaded file executable:
[sourcecode language=”bash”] chmod +x drush.phar
[/sourcecode] 4. Move drush.phar to a location listed in your $PATH, rename to drush:
[sourcecode language=”bash”] sudo mv drush.phar /usr/local/bin/drush
[/sourcecode] That’s all. Thanks.