Installing Drush globally varies based on the operating system or AMP stack, as there is a dependency on PHP 5.5.9 or higher. This dependency will be satisfied in most cases, but ensure that you verify the version of PHP that is available.
Begin by opening the Terminal window, changing into the user directory, and executing the following commands:
- Verify that Composer is installed:
composer
- Add Composer's bin directory to the system path:
export PATH="$HOME/.composer/vendor/bin:$PATH"
- Install the latest stable release:
composer global require drush/drush
- Verify that Drush works:
drush status
- Now that Drush has been installed globally, we can easily ensure that we always have the latest version by running this:
composer global update
- To get our first look at the available commands that Drush provides, we can execute the following:
drush

The list of Drush commands is quite long, but it does provide us with the ability to perform almost any action we may need when working on a Drupal project. Some simple commands that we will commonly use throughout the book are clearing cache, managing configurations, and even installing Drupal. For a list of all the various commands, we can browse Drush Commands at https://drushcommands.com/.