Choose language

Portal Home > Knowledgebase > How-to > Seedboxes > Other software > megacmd installation

megacmd installation

megacmd is a command-line client for copying files to and from storage service.

To install megacmd please login to your SSH, here is an article how to do this:


1. Firstly use this command to create ~/bin directory and add it to your PATH:

mkdir -p ~/bin && echo "PATH=\$HOME/bin:\$PATH" >> ~/.bashrc && source ~/.bashrc

2. Now download go compiler required by megacmd installator:

cd && wget -q

3. Unpack go compiler:

tar xvf go1.3.3.linux-amd64.tar.gz

4. Download megamcd installator with git:

cd && git clone

5. Copy go binaries to the ~/bin:

cp ~/go/bin/* ~/bin/

6. Go to megacmd installator directory:

cd ~/megacmd

7. Install megacmd:

GOROOT=$HOME/go make

8. Copy compiled megacmd binary file to ~/bin:

cp megacmd ~/bin/


Done, megacmd has been installed. You can start it by command:




Usage megacmd:

megacmd [OPTIONS] list mega:/foo/bar

megacmd [OPTIONS] get mega:/foo/file.txt /tmp/

megacmd [OPTIONS] put /tmp/hello.txt mega:/bar/

megacmd [OPTIONS] delete mega:/foo/bar

megacmd [OPTIONS] mkdir mega:/foo/bar

megacmd [OPTIONS] move mega:/foo/file.txt mega:/bar/foo.txt

megacmd [OPTIONS] sync mega:/foo/ /tmp/foo/

megacmd [OPTIONS] sync /tmp/foo mega:/foo


-conf="/home/seedbox/.megacmd.json": Config file path

-force=false: Force hard delete or overwrite

-help=false: Help

-recursive=false: Recursive listing

-skip-error=false: Skip syncing of files that can't be read

-skip-same-size=false: Skip copying of files with same size and path suffix

-verbose=1: Verbose

-version=false: Version





Create a file ~/.megacmd.json file with the following command:

nano ~/.megacmd.json

put there the following json:

    "User" : "MEGA_USERNAME",
    "Password" : "MEGA_PASSWORD",
    "DownloadWorkers" : 4,
    "UploadWorkers" : 4,
    "SkipSameSize" : true,
    "Verbose" : 1

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Making an MTR (Views: 4295)
Resilio update/upgrade (Views: 1539)
Subsonic update-upgrade (Views: 1100)