Installing Drush

Drush is a console utility for quick access to the core of Drupal. Installed with Composer.
  1. Connect to hosting via SSH.
  2. Run the commands:
    mkdir ~/drush && cd ~/drush
    composer require drush/drush:9.*
    echo "alias drush='/usr/local/php72/bin/php ~/drush/vendor/bin/drush' " >> ~/.bashrc && source ~/.bash_profile
    mkdir ~/drush && cd ~/drush
    composer require drush/drush:8.x-dev --prefer-source
    echo "alias drush='/usr/local/php56/bin/php ~/drush/vendor/bin/drush.php' " >> ~/.bashrc && source ~/.bash_profile

This completes the installation of Drush. Now you can run the utility with the command drush in the terminal. To check the version use the command:

drush --version