I am running Ubuntu Server 18.04, and I was wondering if it was possible to download mega.nz files from the command-line, e.g. using putty or some other tool?
23 Answers
Megatools allow you to copy individual files as well as entire directory trees to and from the cloud. You can also perform streaming downloads for example to preview videos and audio files, without needing to download the entire file first. Megatools are robust and optimized for fast operation - as fast as Mega servers allow. This is quite fast. Memory requirements and CPU utilization are kept at minimum.
Megatools is provided in Ubuntu by the universe repository. You can install megatools in all currently supported versions of Ubuntu with the following command:
sudo apt install megatools 6 As of November/21, Ubuntu 20.04 and megatools 1.10.2, you can use Megatools as mentioned in @karel's answer, but megadl has an unfixed issue while dealing with MEGA URLs.
If you need to download a file, the URL will be something like and needs to be changed into for it to work. Remember to put between single quotes, so:
megadl 'Folder URLs need to be adapted too, from to , so:
megadl ' 1 megacmd works without login
mega-get ""have fun building this on debian : P
"proper" distros like nixos or arch have a package for megacmd ...
but you can use nix on debian : D
sudo apt install nix nix-setup-systemd
nix-channel --add
nix-channel update
export PATH=$PATH:$HOME/.nix-profile/bin
nix-env --install megacmd
mega-get ... 1