1) Download Drupal console using following command from terminal
$: curl https://drupalconsole.com/installer -L -o drupal.phar
2) Check downloaded file working properly
$: php drupal.phar
3) Move to a globally accessing path on your system
$: mv drupal.phar /usr/local/bin/drupal
4) Apply executable permissions
$: chmod +x /usr/local/bin/drupal
5) Run below command for generating configuration files to user home directory automatically.
$: drupal init
6) If you want to take advantage of Drupal console command as an autocomplete feature from terminal then execute below commands from home directory.
$: source “$HOME/.console/console.rc” 2>/dev/null
$: ln -s ~/.console/drupal.fish ~/.config/fish/completions/drupal.fish
Congratulations!!! You, just installed Drupal console on our system.
Note: If you want to allow your project use Drupal Console for selected projects from other projects then you need to run below command. This is done using Composer.
$: composer require drupal/console:~1.0 –prefer-dist –optimize-autoloader