Installing Community Extensions via command line

The eCommerce platform Magento has a large community with paid and free extensions.
An efficient way to install the community extensions is via the command line in an SSH terminal and here is how you do it.
As I sometimes I forget the exact procedures I’d thought i’d share it with you in case you where in the same boat.

Find your extension on Magento connect, and get the extension key.
Navigate to your root directory and setup mage, and then install the community extension
For example to install the IG Lightbox extension (

./mage mage-setup
./mage -V
./mage list-channels
./mage install
./mage install IG_LightBox
This is intended for Magento connection 2.0 extensions