Megatools is a great collection of command line utilities that allow you to interact with your mega.nz account directly from the command line. You can directly download using the cli on your Ubuntu machine. They are a great set of tools, however, installing them does get confusing for a new Linux user. This guide will show you how to install it and set it up in no time.
First you need to find out what’s the latest version of megatools available.
To find out the latest version, simply visit any one of the links below and see what’s the latest version number:
At the time of writing this article (9 October 2016), the latest version was
1.9.97. If it is different in your case, simply replace
1.9.97 with your version in all the commands below.
Open your Ubuntu terminal (or SSH to it) and type in the following commands one after the other.
sudo apt-get update
Run this command to download the package lists from the repositories and “update” them to get information on the newest versions of packages and their dependencies.
sudo apt-get install libtool libglib2.0-dev gobject-introspection libgmp3-dev nettle-dev asciidoc glib-networking openssl libcurl4-openssl-dev libssl-dev
This installs all the dependencies that you may need to compile megatools from source.
wget is used to download the latest megatools. Replace
1.9.97 with the latest version is available.
zcat megatools-1.9.97.tar.gz > megatools-1.9.97.tar tar -xf megatools-1.9.97.tar
zcat to decompress the downloaded file and
tar -xf to extract the contents to a folder.
cd megatools-1.9.97/ ./configure make sudo make install
Finally, run the above commands to compile megatools and install it in your system.
If all went well, you should now have megatools installed on your system.
To download from a mega.nz link, simply type
megadl '<link>' and the download will start.
Here’s an example:
For syntax of other commands, type
That’s it. You’re done!