Installing and Using MEGAcmd on Raspberry Pi

MEGA is a cloud storage and file-sharing service formerly owned by Kim Dotcom, the founder of Megaupload and Megavideo. It was created as the successor to Megaupload, which was shut down by the US Department of Justice on 19 January 2012, but it differs from it in several respects.

First of all, it is structured as an online hard disk, similar to Dropbox, offering an initial amount of free storage that can be extended for a fee if you wish. Secondly, it uses end-to-end encryption technology based on codes called “keys”, which should make it impossible to trace the data.

Like Dropbox, MEGA has its own desktop application for keeping the folders on your device in sync with the cloud; but unlike Dropbox, as well as the desktop app for all operating systems, including a version for Raspberry Pi (MEGAsync), there is also a lightweight command-line version called MEGAcmd.

The first step before installing MEGAcmd is to download the package from here (if you are downloading it on a different machine from your Raspberry Pi, once the download is complete you can transfer it to your device via SFTP).

Before running the MEGAcmd setup, we need to install two prerequisite packages with the following command in the terminal:

sudo apt install libc-ares2 libcrypto++6

Now go to the folder where you saved the .deb file and install the MEGAcmd package you downloaded earlier with the following command:

sudo dpkg -i megacmd-Raspbian_9.0_armhf.deb

All that’s left now is to test that MEGAcmd works with the following command:

mega-login login your_mega_username your_mega_password

Of course, replace your_mega_username and your_mega_password with the login credentials for your MEGA account.

To view the list of folders and files in your account, type:

mega-ls /

To sync a folder on your Raspberry Pi with a specific folder on MEGA, type:

mega-exec sync /path/on/your/Raspberry /path/on/mega

again, replace the two fields with the ones that apply to you.

These are just a few examples of how to use MEGAcmd; for more in-depth information, I recommend taking a look at the GitHub repository (https://github.com/meganz/MEGAcmd), which documents all the available functions.

Enjoy!

Enjoy!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top