Install drush globally using composer on WSL
With reference to my previous post, Setup development environment for Drupal on windows 10, I noticed that installing drush on WSL using composer doest work by default, in this post I am going to demonstrate how to install drush globally using composer on WSL.
I am assuming you have composer install, in order to install drush we have to follow below mentioned steps:
$ composer global require drush/drush
Now check drush installed path by running:
$ composer config --global home
This will print path for drush currently install i.e. /home/my-user-name/.config/composer, now we have to set this in PAHT so that drush command can be run from anywhere, using command replace my-user-name with your own:
$ echo 'export PATH="/home/my-user-name/.config/composer/vendor/bin:$PATH"' >> ~/.bashrc
$ source ~/.bashrc
Now check that drush command is working by running
$ drush
Comments
Post a Comment
There is comment posted on your blog, chandu7929@blogpost.com