How to install and update Mega command line (megacmd) on your Raspberry Pi running Ubuntu 20.04

This quick guide will teach you how to add the Mega.nz Repositroy so you can easily install and upgrade the “Megacmd” and “Megasync” apps on your Linux Distribution. This tutorial will show you how to do it specifically on Ubuntu 20.04, however, the instructions can be easily modified for any ARM based debian based distribution.

STEP 1:

Go to the Mega.nz repository at https://mega.nz/linux/MEGAsync/ in your web browser, and select the folder that pertains to your working distribution. For the Raspberry Pi (because you need the ARM version), that is going to be the Raspbian_10.0 folder located at https://mega.nz/linux/MEGAsync/Raspbian_10.0/.

Then Go to your terminal and add the Release.key file to your apt repository:

wget -qO - https://mega.nz/linux/MEGAsync/Raspbian_10.0/Release.key | sudo apt-key add -

STEP 2: Figure out your systems architecture.

Before adding mega.nz to your repository list, you first need to verfiy that you are using the 32-bit Ubuntu or Raspberry Pi OS distribution. If you are not, then you need to add the 32 bit architecture to your OS.

Verify your architecture with the following command:

dpkg --print-architecture

If the above command returns “arm64”, then proceed to the next step (STEP 2b). If the above command returns “armhf”, then you shoudl skip the next step (STEP 2b). If it returns “arm64” then you should continue with the next step (STEP 2b).

STEP 2b:

Add support for a 32-bit arm foreign architecture (armhf) with the following command:

sudo dpkg --add-architecture armhf

Verify you are now using armhf as a foreign architecture, with the following command:

dpkg --print-foreign-architectures

You should see “armhf” from this command. Now you may move on to STEP 3.

STEP 3:

Add the mega.nz repo to your apt repository by openining up your nano editor in terminal…

sudo nano /etc/apt/sources.list.d/MEGA.nz.list

then pasting the indicated code below:

# Mega.nz repo for 32bit (compatable with 64-bit) Raspberry Pi
deb [arch=armhf] https://mega.nz/linux/MEGAsync/Raspbian_10.0/ ./

Type “Control-X“, then “y“, then “Enter“, to save and quit your nano editor.

Now, update your apt list, then install mega-cmd from your newly added repository with the following command:

sudo apt update && sudo apt install megacmd

Now, whenever you run the command sudo apt update && sudo apt upgrade your “megacmd” installation will automatically update, when updates are available.

To run your newly installed mega command line application run the following command:

mega-cmd

DONE!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.