In this guide we are installing Drush, the command line interface of Drupal. According the the developers:
Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.
Prerequisites
Install dependencies
Run the commands as the admin user:
$ sudo apt -y install curl unzip
$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Install Drush
Switch to the webadmin user:
$ sudo su - webadmin
Install Drush:
$ cd cms/
$ composer require drush/drush
Them we need to add drush
in the $PATH:
$ mkdir ~/bin
$ cd ~/bin
$ ln -s ../cms/vendor/bin/drush
You can run drush to check the status of your Drupal install, with:
$ drush status
NOTE: This command must be run under the cms directory.
References