By user16289


2016-06-22 00:25:22 8 Comments

How do you install Drush on WSL (Windows Subsystem for Linux) when the following command from Drush docs, doesn't work?

php -r "readfile('http://files.drush.org/drush.phar');" > drush

2 comments

@user16289 2016-06-22 00:25:22

sudo wget http://files.drush.org/drush.phar
sudo mv drush.phar /usr/local/bin/drush
sudo chmod +x /usr/local/bin/drush
# test drush by executing:
drush status

Note_1: For possible future releases --- If there will be non-Ubuntu version of WSL you might need to download the wget Linux utility to use it for downloading drush.phar.

Note_2: To those who have yet to install WSL - See this thread.

@Yaron Meiner 2016-10-19 02:10:49

Better to follow this to require with composer: https://www.drupal.org/node/1248790

  1. Install composer globaly:

    $ curl -sS https://getcomposer.org/installer | php

    $ sudo mv composer.phar /usr/local/bin/composer

  2. Require drush:

    composer global require drush/drush:7.*

The instructions in drupal.org also show how to add the path so you can use drush from everywhere.

Im working with WSL and it works great.

Related Questions

Sponsored Content

1 Answered Questions

[SOLVED] Drupal 8 url after installation using drush site-install

  • 2020-01-16 22:41:03
  • Alison
  • 66 View
  • 0 Score
  • 1 Answer
  • Tags:   drush

10 Answered Questions

2 Answered Questions

[SOLVED] Is it possible to run drush 8 smoothly on Win10 WSL (Windows Subystem for Linux)?

  • 2016-05-16 23:12:21
  • user16289
  • 869 View
  • 5 Score
  • 2 Answer
  • Tags:   drush

2 Answered Questions

[SOLVED] Could not open input file: drush

  • 2017-07-12 23:23:52
  • Rob Brandt
  • 1481 View
  • 0 Score
  • 2 Answer
  • Tags:   drush installing

2 Answered Questions

[SOLVED] Drush 8.1.2 is not working on Windows

  • 2016-06-19 14:45:09
  • Rajesh Vishwakarma
  • 868 View
  • 1 Score
  • 2 Answer
  • Tags:   drush

1 Answered Questions

[SOLVED] Using php command to pass custom php.ini values into drush phar

  • 2016-08-30 02:28:57
  • zerorez
  • 268 View
  • 1 Score
  • 1 Answer
  • Tags:   drush

1 Answered Questions

Running drush site-install on Windows

  • 2015-12-11 03:29:10
  • Drupal 8 test
  • 184 View
  • 1 Score
  • 1 Answer
  • Tags:   drush 8 installing

Sponsored Content