How to Install Mega.nz Cloud Drive on Ubuntu – Free 20GB Storage

This tutorial is going to show you how to install MEGA.nz cloud drive on Ubuntu desktop and server. MEGA.nz is a cloud storage provider from New Zealand. It offers 20GB free storage upon registration and also allows you to get up to 50GB free space.

MEGA.nz Features

  • Zero-knowledge encryption (user-controlled end-to-end encryption).
  • Open-source client apps.
  • Cross-platform, available on Linux, macOS, Windows, iOS, Android and NAS.
  • Command Line client available for Linux servers.
  • Full sync and selective sync
  • Two-factor authentication for an additional layer of security.
  • Protect your share link with a password or make it automatically expire after a certain amount of time.
  • File versioning allows you to revert the files back to a moment in time.
  • MEGAdrop: A MEGAdrop folder allows anyone to upload files to your MEGA cloud, even if they don’t have an account.
  • MEGAchat: audio/video calls with MEGA’s end-to-end encrypted chat.

Install MEGAsync Client on Ubuntu Desktop

If you don’t have a MEGA.nz account yet, go to MEGA.nz website and create an account. Then download the MEGA sync client for Linux. Select your Ubuntu version (Ubuntu 18.04, Ubuntu 20.04 or Ubuntu 22.04).

megasync linux client

Once the MEGA sync deb package is downloaded, cd to the download directory. For example, my MEGA sync is downloaded to the Downloads directory under Home, so I run the following command. The tilde (~) represents home directory.

cd ~/Downloads

Then use the apt package manager to install deb package.  The dot (.) represents the current directory.

sudo apt install ./megasync-xUbuntu_20.04_amd64.deb

Note that when you type the following

sudo apt install ./megasync

You can press the Tab key, which will autocomplete the filename.

install megasync on Ubuntu

Once it’s installed, open MEGA sync from your application menu. A login window will pop up. Enter your MEGA.nz email address and password.

mega desktop app ubuntu

Next, you can choose to sync all Mega cloud folder or specific folders. I choose full sync.

mega sync selective sync

Then choose the local folder that will be used to store your MEGA files.

megasync local folder

After the setup is finished, you can also select other folder on your hard drive to be synced with MEGA cloud drive in the settings.

megasync settings

How to Install MEGA Client on Ubuntu Server

To use MEGA on a headless Ubuntu server, you need to install the MEGA command-line client.

Download MEGA CMD client. Select your Ubuntu version (Ubuntu 18.04, Ubuntu 20.04 or Ubuntu 22.04).

mega command line client ubuntu

You can use the following command to download it from the command line.

Ubuntu 18.04

wget https://mega.nz/linux/repo/xUbuntu_18.04/amd64/megacmd-xUbuntu_18.04_amd64.deb

Ubuntu 20.04

wget https://mega.nz/linux/repo/xUbuntu_20.04/amd64/megacmd-xUbuntu_20.04_amd64.deb

Ubuntu 22.04

wget https://mega.nz/linux/repo/xUbuntu_22.04/amd64/megacmd-xUbuntu_22.04_amd64.deb

Then run the following command to install it.

sudo apt install ./megacmd*.deb

Next, run the interactive mega-cmd command.

mega-cmd

Then use the sub-command login to log into your account.

login your-mega-email-address

It will prompt you to enter your MEGA password.

Once logged in, you will be dropped into the MEGA folder. To exit, run

exit

To resume the session, run mega-cmd again.

mega-cmd

mega-cmd login ubuntu

To learn how to use MEGA from the command line, read the detailed MEGA CMD user guide or type help and hit Enter in the terminal window.

Getting More Free Space

You can get up to 50GB of free space.

  • Install the MEGA desktop app to get 5GB of free storage.
  • Install the MEGA mobile app to get 5GB of free storage.
  • Add a phone number to get 5GB of free storage.
  • Invite your friends to sign up for MEGA. Each will get you 5GB of free storage.

However, these bonuses are valid for 365 days only. For more information, check out the MEGA achievements page.

Wrapping Up

I hope this article helped you to install and use MEGA.nz cloud drive on Ubuntu desktop and server. As always, if you found this post useful, then subscribe to our free newsletter to get more tips and tricks 🙂

Rate this tutorial
[Total: 7 Average: 4.7]

3 Responses to “How to Install Mega.nz Cloud Drive on Ubuntu – Free 20GB Storage

  • Hi
    Thank you so much for this tutorial, I think the decision to move away from Windows to Linux distros was influenced by people such as yourself who take their time to help others. I wasn’t really looking to install Mega currently but I ended up doing it because of how easy it was to actually do it.

    I’m new to linux so I will be looking forward to the lessons via email

    blessed regards

  • Hi,
    Thanks for the tutorial, I wanted to point out something peculiar behavior since you updated this article. After recent changes when I use mega-cmd to upload content there are no thumbnails in my mega drive which was correctly showing before.
    Could you please privide the previous version of the commands? I think you are downloading .deb file from different source before.

    Thanks

  • usergroup63
    1 week ago

    Hi, I install megasync on headless ubuntu 24.04 sever a couple days ago.
    instead of using mega-cmd, I find using x forwarding to run megasync gui on my local laptop worked.
    The trick is that ssh -X login as root
    (need to enable ssh root login by editing sshd_confg file: PermitRootlogin yes and PasswordAuthentication yes.)
    $ ssh -X root@(server ip)
    then run $ megasnyc
    the megasync applet on tray will appear.
    p.s ssh -X login as user into server, then use $ sudo, doesn’t work. it has to use Rootlogin.

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here