Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Create a shortcut for drush

By editor , 21 January, 2021
Question

Different possibilities to run drush (drush 10)

Method 1 : Install and run drush as described in this article
This is the recommended method

Method 2 : Create a shortcut on ~/.local/bin

1. Create a link to drush exec file on ~/.local/bin
Example:
cd ~/.local/bin
ln -s 'PATH TO DRUSH BIN'
Example:
ln -s /home/drupal/.config/composer/vendor/bin/drush

2. If not added yet, add ~/.local/bin folder to env path (Tutorial) to load automaticly or load manually like
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH

Methos 3 : Create shorcut on .bashrc
Edit ~.bashrc file and add (For example)
alias drush='PATH TO DRUSH BIN'
Example:
alias drush='/home/drupal/.config/composer/vendor/bin/drush'

Tags

  • Drush 10
  • Linux
Install drush 10
Linux local and common bin folders (environnement path)

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer