Mega is a Secure Cloud Storage and Communication. Privacy by Design. Create a MEGA account to get 50 GB FREE storage (reduced to 15GB in 30 days)

  • Reliable Storage and Fast Transfers
  • End-to-End Encryption
  • Secure Communication
  • The Secure Solution for Your Business
    • Personal Account From 4.99 € / month
    • Business Account From 10.00 € / user / month (min of 3 users)
  • Open Source
  • File Versioning
  • File backup
  • Extensions (FF/Chrome)
  • MEGAdrop
  • MEGAbird
  • MEGAcmd – Commandline, Scriptable, Autobackup, WebDav, FTP
  • MEGAcmd – Command Line Interactive and Scriptable Application –
  • MEGAcmd User Guide –

Mega Plans

FREE$0.0050 GB10 GB/Month on DL
LITE€4.99/month – €49.99/year200 GB1 TB
PRO I€9.99/month – €99.99/year500 GB2 TB
PRO II€19.99/month – €199.99/year2 TB4 TB
PRO III€29.99/month – €299.99/year4 TB8TB

Command line summary

These summaries use the usual conventions – [] indicates its content is optional, | indicates you should choose either the item on the left or the one on the right (but not both)

Each command is described as it would be used in the interactive MEGAcmd shell, and the corresponding scriptable command (which must be prefixed with mega-) works in the same way.

Commands referring to a remote path are talking about a file in your MEGA account online, whereas a local path refers to a file or folder on your local device where MEGAcmd is running.

Verbosity: You can increase the amount of information given by any command by passing -v (-vv, -vvv, …)

Account / Contacts

  • signupemail [password] [--name="Your Name"] Register as user with a given email.
  • confirmlink email [password] Confirm an account using the link provided after the “signup” process.
  • invite[-d|-r] dstemail [--message="MESSAGE"] Invites a contact / deletes an invitation.
  • showpcr[--in | --out] Shows incoming and outgoing contact requests.
  • ipcemail|handle -a|-d|-i Manages contact incoming invitations.
  • users[-s] [-h] [-n] [-d contact@email] List contacts
  • userattr[-s attribute value|attribute] [--user=user@email] Lists/updates user attributes
  • passwd[oldpassword newpassword] Modifies user password
  • masterkeypathtosave Shows your master key.

Login / Logout

  • login[email [password]] | exportedfolderurl#key | session Logs into MEGA
  • logout[--keep-session] Logs out
  • whoami[-l] Print info of the user
  • session Prints (secret) session ID
  • killsession[-a|sessionid] Kills a session of current user.


  • cd[remotepath] Changes the current remote folder
  • lcd[localpath] Changes the current local folder for the interactive console
  • ls[-lRr] [remotepath] Lists files in a remote path
  • pwd Prints the current remote folder
  • lpwd Prints the current local folder for the interactive console
  • attrremotepath [-s attribute value|-d attribute] Lists/updates node attributes
  • du[-h] [remotepath remotepath2 remotepath3 ... ] Prints size used by files/folders
  • find[remotepath] [-l] [--pattern=PATTERN] [--mtime=TIMECONSTRAIN] [--size=SIZECONSTRAIN] Find nodes matching a pattern
  • mount Lists all the main nodes

Moving/Copying Files

  • mkdir[-p] remotepath Creates a directory or a directory hierarchy
  • cpsrcremotepath dstremotepath|dstemail Copies a file/folder into a new location (all remotes)
  • put[-c] [-q] [--ignore-quota-warn] localfile [localfile2 localfile3 ...] [dstremotepath] Uploads files/folders to a remote folder
  • get[-m] [-q] [--ignore-quota-warn] exportedlink#key|remotepath [localpath] Downloads a remote file/folder or a public link
  • preview[-s] remotepath localpath To download/upload the preview of a file.
  • thumbnail[-s] remotepath localpath To download/upload the thumbnail of a file.
  • mvsrcremotepath [srcremotepath2 srcremotepath3 ..] dstremotepath Moves file(s)/folder(s) into a new location (all remotes)
  • rm[-r] [-f] remotepath Deletes a remote file/folder
  • transfers[-c TAG|-a] | [-r TAG|-a] | [-p TAG|-a] [--only-downloads | --only-uploads] [SHOWOPTIONS] List or operate with transfers
  • speedlimit[-u|-d] [-h] [NEWLIMIT] Displays/modifies upload/download rate limits
  • sync[localpath dstremotepath| [-dsr] [ID|localpath] Controls synchronizations
  • exclude[(-a|-d) pattern1 pattern2 pattern3 [--restart-syncs]] Manages exclusions in syncs.
  • backuplocalpath remotepath --period="PERIODSTRING" --num-backups=N Set up a new backup folder and/or schedule
  • backup[-lhda] [TAG|localpath] [--period="PERIODSTRING"] [--num-backups=N]) View/Modify an existing backup schedule

Sharing (your own files, of course, without infringing any copyright)

  • cpsrcremotepath dstremotepath|dstemail Moves a file/folder into a new location (all remotes)
  • export[-d|-a [--expire=TIMEDELAY]] [remotepath] Prints/Modifies the status of current exports
  • importexportedfilelink#key [remotepath] Imports the contents of a remote link into your account
  • share[-p] [-d|-a [--level=LEVEL]] [remotepath] Prints/Modifies the status of current shares
  • webdav[ [-d] remotepath [--port=PORT] [--public] [--tls --certificate=/path/to/certificate.pem --key=/path/to/certificate.key]] Sets up the ability to download a file from your MEGA account via your PC/device.


  • version[-l][-c] Prints MEGAcmd versioning and extra info
  • deleteversions [-f] (--all | remotepath1 remotepath2 ...) Delete prior versions of files to save space.
  • unicode Toggle unicode input enabled/disabled in interactive shell
  • reload Forces a reload of the remote files of the user
  • help[-f] Prints list of commands
  • https[on|off] Shows if HTTPS is used for transfers. Use https on to enable it.
  • clear Clear screen
  • log[-sc] level Prints/Modifies the current logs level
  • debug Enters debugging mode (HIGHLY VERBOSE)
  • exit|quit [--only-shell] Quits MEGAcmd