How to check Drush version?
Drush is a free and open-source software command line and scripting interface for Drupal. It is very popular among Drupal developers. Here is a way to check whether your system has Drush installed and identify its version.
Open a terminal, change to your Drupal project folder and execute the following command
It will give you the version of Drupal, Drush and some additional information as well. Here is what I get when I executed the command.
Drupal version : 9.3.5 Site URI : http://default DB driver : mysql DB hostname : database DB port : 3306 DB username : root DB name : drupal9 PHP binary : /usr/bin/php7.3 PHP config : /etc/php/7.3/cli/php.ini PHP OS : Linux Drush script : /var/www/html/Project/drupal9/vendor/drush/drush/drush Drush version : 10.6.2 Drush temp : /tmp Drush configs : /var/www/html/Project/drupal9/vendor/drush/drush/drush. yml Drupal root : /var/www/html/Project/drupal9 Site path : sites/default
You can also use drush --version to know which version of Drush are you using.
If you do not have Drush, ie you get a command not found error, follow the installation instructions. Before you download/install Drush, check the drush version compatibility matrix to make sure that it is compatible with your system.