I am looking to download and install a module using the Linux command line.
How can I do this?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityYou can install Drush (see Installing Drush on Ubuntu or How to install Drush server-wide in less than one minute); after, you can install a module with drush:
to download a module
drush dl modulename
to enable the module
drush en modulename
Also, you can use wget to download the module, and make a directory inside the modules directory (in this case the modules directory is /home/youruser/public_html/sites/all/modules/).
wget http://ftp.drupal.org/files/projects/modulename-6.x.tar.gz
mkdir -p /home/youruser/public_html/sites/all/modules/modulename
tar -zxf modulename-6.x.tar.gz -C /home/youruser/public_html/sites/all/modules/modulename
Enable the module in "Administer > Site building > Modules."
To install Drupal modules using command line, you have to install Drush Composer
on your machine.
So use this link to install Drush using composer : https://github.com/drush-ops/drush
After installing it, open your terminal and go to your project/drupal directory into which you want to download modules.
To download and enable modules using a single command, run following command:
drush en -y your_module_name
Note : your_module_name should be the name present on the url of the module name like https://www.drupal.org/project/your_module_name
The best way to do this is via the Drush project. This will allow you to download and enable modules via the command line similar to the code below.
# Download the Views module
drush dl views
# Enable the Views module
drush en views
If you don't have (or don't want) drush, you can also just do something like this:
$ cd $MY_DRUPAL_SITE_ROOT/sites/all/modules
$ wget http://ftp.drupal.org/files/projects/querypath-6.x-1.6.tar.gz
$ tar -zxvf querypath-6.x-1.6.tar.gz
(the -z flag to the tar command does a "gunzip" of the file before untarring)
From there, you can go to the Site Building -> Modules screen and install the module there.
That said, if you are going to be doing this a lot, Drush is very helpful
Install drush, which is a command line tool for Drupal. Downloading and installing a module would just need you to execute two commands. (The first command download the module, and the other one installs it.)
drush dl <modulename>
drush en <modulename> -y
These commands will take care of module dependencies too.
1- By using cyber duck tool we can import any thing into linux server from windows.using ip,username,password,port. http://www.v3.co.uk/v3-uk/download-review/2032496/cyberduck-windows-v401
2- wget http://ftp.drupal.org/files/projects/modulename-7.x-1.0-rc2.tar.gz
mkdir -p /home/force_password_change-7.x-1.0-rc2.tar.gz -C /home/www/html/transgenic/sites/all/modules/modulenmae
procedure -open terminal and give the download link adrress(above format) it will download save on desktop and follow second command and you can able to see your module,in modules.