What Is Drush?
Drush (a portmanteau of Drupal Shell) is a Linux application that allows you to perform many common tasks (such as installing and updating modules, clearing caches, viewing and deleting watchdog messages, etc.) from the command line. It's a handy tool, especially if you maintain a lot of Drupal sites.
Using Drush
As of November, 2009, Drush is installed on the corn timeshare machines. SSH into corn (see logging into shared UNIX workstations for more info) and start using drush by typing:
drush help
Example 1: Downloading, Enabling, and Disabling Modules
First, you need to change your current working directory to your drupal modules directory. Type:
cd /afs/ir/group/yourgroup/cgi-bin/drupal/sites/all/modules
Next, type:
drush dl admin_menu
Next, type:
drush -y en admin_menu
To disable the module, type:
drush -y dis admin_menu
Example 2: Updating Modules
Type:
drush -sy update
Finally, type:
drush -y up
More Fun with Drush
- will clear your caches
drush cc
- generates a report of which modules are installed, enabled, and disabled
drush pml modules
- runs Drupal's cron scripts
drush cron
(Special thanks to Jon Robertson and Tim Skirvin of ITS for helping with the configuration and installation of Drush on Leland!)