MEGACMD(1)

πŸ“¦ version 2.5.2, in ubuntu stonking

πŸ¦‹ MEGACMD(1) β€” the User Commands era πŸ’–

okay bestie, sit down, hydrate, because this is the page for megacmd, the command-line interface for MEGA.nz cloud storage. it lives in section 1 of the manual (User Commands, if you're being fancy about it). ✨


🌸 NAME 🌸

megacmd β€” Command-line interface for MEGA.nz cloud storage

πŸŽ€ SYNOPSIS πŸŽ€

megacmd [command] [options]

πŸ’… DESCRIPTION πŸ’…

MEGAcmd is a command-line interface for interacting with the MEGA.nz cloud storage service, no cap. πŸ”₯

It provides a wide variety of commands for file management, synchronization, user control, debugging, and more. it's giving everything app, but for your cloud. 🫢

πŸ‘‘ COMMAND CATEGORIES πŸ‘‘

1. Account / Contacts πŸ’Œ

These commands allow you to manage files and folders on your MEGA account:

  • mega-signup β€” Create a new MEGA account.
  • mega-confirm β€” Confirm newly created account.
  • mega-invite β€” Invite users to folders.
  • mega-showpcr β€” Show pending contact requests.
  • mega-ipc β€” Manages contact incoming invitations.
  • mega-users β€” Shows your current list of contacts.
  • mega-userattr β€” Manage user attributes.
  • mega-passwd β€” Change account password.

2. Login / Logout πŸ”

Authentication and user session commands:

  • mega-login β€” Authenticate and log in.
  • mega-logout β€” Log out and end session.
  • mega-whoami β€” Show current user info.
  • mega-session β€” Manage active sessions.
  • mega-killsession β€” Kill remote session.

3. Browse 🧭

  • mega-cd β€” Change remote directory.
  • mega-lcd β€” Set the local directory for downloads.
  • mega-ls β€” List directory contents.
  • mega-pwd β€” Show current remote directory.
  • mega-lpwd β€” View the directory where downloads are saved.
  • mega-attr β€” Manage file attributes.
  • mega-du β€” Show disk usage.
  • mega-find β€” Search for files.
  • mega-mount β€” Mount MEGA storage using FUSE.

4. Moving / Copying files 🚚

  • mega-mkdir β€” Create new remote directories.
  • mega-cp β€” Copy files.
  • mega-put β€” Upload files to MEGA.
  • mega-get β€” Download files from MEGA.
  • mega-preview β€” Preview file contents.
  • mega-thumbnail β€” Generate thumbnails.
  • mega-mv β€” Move or rename files.
  • mega-rm β€” Remove files.
  • mega-transfers β€” Manage transfer queue.
  • mega-speedlimit β€” Configure speed limits.
  • mega-sync β€” Manage sync folders.
  • mega-sync-issues β€” List synchronization issues.
  • mega-sync-ignore β€” Ignore files during sync.
  • mega-sync-config β€” Configure synchronization.
  • mega-exclude β€” Exclude files from syncing.
  • mega-backup β€” Create backups.

5. Sharing 🌈

  • mega-export β€” Export public links.
  • mega-import β€” Import files or links.
  • mega-share β€” Share files with other users.
  • mega-webdav β€” Run WebDAV server for MEGA.

6. FUSE 🧚

  • mega-fuse-add β€” Add new FUSE mount point.
  • mega-fuse-remove β€” Remove FUSE mount.
  • mega-fuse-enable β€” Enable FUSE support.
  • mega-fuse-disable β€” Disable FUSE support.
  • mega-fuse-config β€” Configure FUSE behavior.
  • mega-fuse-show β€” Show all FUSE mounts.

7. Miscellaneous / Utility Commands πŸ› οΈ

  • mega-cancel β€” Cancel ongoing transfers or commands.
  • mega-cat β€” Display file contents.
  • mega-cmd β€” Main command-line interface.
  • mega-confirmcancel β€” Cancel account confirmation request.
  • mega-cmd-server β€” Run background server daemon.
  • mega-debug β€” Debugging tools.
  • mega-deleteversions β€” Delete old file versions.
  • mega-df β€” Show free/used disk space.
  • mega-errorcode β€” Explain MEGA error codes.
  • mega-exec β€” Execute external commands.
  • mega-ftp β€” Run FTP server for MEGA.
  • mega-graphics β€” Image processing operations.
  • mega-help β€” Display help for MEGAcmd commands.
  • mega-https β€” Configure HTTPS settings.
  • mega-mediainfo β€” Show media metadata.
  • mega-log β€” Show system logs.
  • mega-permissions β€” Manage file permissions.
  • mega-proxy β€” Set proxy configuration.
  • mega-quit β€” Exit the MEGAcmd interface.
  • mega-reload β€” Reload sync configuration.
  • mega-tree β€” Show directory tree.
  • mega-version β€” Show MEGAcmd version.

⭐ EXAMPLES FILE MANAGEMENT ⭐

1. Account / Contacts πŸ’–

mega-signup

Register a new account. Create a new MEGA account with the specified email. ✨

signup email password [--name="Your Name"]
mega-signup user@example.com password --name="Your Name"
Account nilsonfsilva@yahoo.com created successfully. You will receive a confirmation link.
Use "confirm" with the provided link to confirm that account2025-08-18_01-06-58.697476 cmd DBG 1 user received or updated

For more options see:mega-signup --help

mega-confirm

Confirm a signup. Confirm your MEGA account registration with a code. πŸŽ€

mega-confirm https://mega.nz/confirm#ABC123XYZ456 yuer_email_@exemplo.com temporary_password

For more options see: mega-confirm --help

mega-invite

Invite contacts. Send an invitation to connect with a user. πŸ’Œ

  • mega-invite user_invite@example.com β€” Send an invitation.
  • mega-invite user_invite@example.com --message="Let's share documents through MEGA" β€” Send invitation with a personalized message.
  • mega-invite user_invite@example.com β€” Resends the invitation if the user has not yet accepted.
  • mega-invite -d user_invite@example.com β€” Remove the invitation.

For more options, see mega-invite --help

mega-showpcr

Show pending contact requests πŸ‘€

mega-showpcr
Outgoing PCRs:
new_user@example.com (id: yhqayiy8D60, creation: Tue, 29 Jul 2025 22:55:18 -0300, modification: Tue, 29 Jul 2025 22:55:18 -0300)

For more options, see mega-showpc --help

mega-ipc

Manages contact incoming invitations.

Options:

  • -a β€” Accepts invitation
  • -d β€” Rejects invitation
  • -i β€” Ignores invitation [WARNING: do not use unless you know what you are doing]
mega-ipc -a user_invite@example.com
2025-07-30_02-24-12.509694 sdk INFO Request (REPLY_CONTACT_REQUEST) starting [megaapi_impl.cpp:17177]
2025-07-30_02-24-13.899259 sdk INFO Request (REPLY_CONTACT_REQUEST) finished [megaapi_impl.cpp:17224]
Accepted invitation by user_invite@example.com

For more options, see mega-ipc --help

bestie, for real, that -i flag is a do not touch situation. the original literally says do not use it unless you know what you're doing. πŸ’€

mega-users

Shows your current list of contacts

mega-users
user_invite@example.com. Contact since Tue, 29 Jul 2025 22:29:57 -0300. Visible
   | Contact [user_invite@example.com.] is not verified |
   |Type "mega-users --help-verify user_invite@example.com" to get instructions on |
   | verification

For more options, see mega-users --help

mega-userattr

Access user attributes => List user attributes associated with your account. 🏷️

  • -s attribute value β€” sets an attribute to a value
mega-userattr -s firstname new_name
  • --list β€” lists valid attributes
mega-userattr --list
AVATAR (+a)
FIRSTNAME (firstname)
LASTNAME (lastname)
AUTHRING (!authring)
LAST_INT (!lstint)
ED25519_PUBK (+puEd255)
CU25519_PUBK (+puCu255)
KEYRING (*keyring)
SIG_RSA_PUBK (+sigPubk)
SIG_CU255_PUBK (+sigCu255)
COUNTRY (country)
BIRTHDAY (birthday)
BIRTHMONTH (birthmonth)
BIRTHYEAR (birthyear)
LANGUAGE (^!lang)
PWD_REMINDER (^!prd)
DISABLE_VERSIONS (^!dv)
CONTACT_LINK_VERIFICATION (^clv)
RICH_PREVIEWS (*!rp)
RUBBISH_TIME (^!rubbishtime)
LAST_PSA (^!lastPsa)
STORAGE_STATE (^!usl)
GEOLOCATION (!geo)
CAMERA_UPLOADS_FOLDER (!cam)
MY_CHAT_FILES_FOLDER (!cf)
PUSH_SETTINGS (^!ps)
UNSHAREABLE_KEY (~usk)
ALIAS (*!>alias)

Example:

mega-userattr firstname
mega-userattr lastname
mega-userattr *keyring
mega-userattr '^!lang'
mega-userattr '^!prd'

for more options see:mega-userattr --help

mega-passwd

Change password. Change your MEGA account password interactivel. πŸ”‘

mega-passwd NEW_PASSWORD
Changing password will close all your sessions. Are you sure?(Yes/No):  yes
Password changed successfully

for more options see:mega-passwd --help

heads up: changing that password logs out every session you've got open. all of them. periodt. 😭

2. Login / Logout πŸ”

mega-login

Log into MEGA account => Authenticate and log into your MEGA account.

mega-login user@example.com password

For safer and more advanced ways see: mega-login --help

mega-logout

Log out from MEGA => End your current MEGA session. πŸ‘‹

mega-logout
Session closed

for more options see:mega-logout --help

mega-whoami

Show current user => Display the username of the logged-in account. πŸͺž

mega-whoami
Account e-mail: user@exemple.com

for more options see:mega-whoami --help

mega-session

Manage sessions => List and manage your active MEGA sessions.

Current session list:
mega-session
 your (secret) session is: AZqVYh5z9lHnrKdsgCxP2OBhpUjpRnlud__tUsqOXdNcS1odHVPTGvLP80_rnQqVlFjuIpq2gWY

List all sessions:

mega-session -l
Account e-mail: user@example.com
   Available storage:  50.00 GBytes
       In ROOT:        5.17 GBytes in  2641 file(s) and   287 folder(s)
       In INBOX:      0.00   Bytes in     0 file(s) and     0 folder(s)
       In RUBBISH:   246.38 KBytes in     1 file(s) and     0 folder(s)
       Total size taken up by file versions:     0.00   Bytes
   Pro level: 0
   Subscription type:
   Account balance:
Current Active Sessions:
   * Current Session
   Session ID: SUI3EEnUY
   Session start: Sun Aug 17 16:34:10 2025
   Most recent activity: Sun Aug 17 16:34:11 2025
   IP: 2804:18:607a:4f56:66a5:88fa:2f08:9661
   Country: BR
   User-Agent: MEGAcmd/ (debian 13/Linux 6.12.38+deb13-amd64 x86_64) MegaClient/9.8.0/64
   -----
   Session ID: keA-ukFAUQk
   Session start: Fri Aug 15 07:24:42 2025
   Most recent activity: Sun Aug 17 12:57:16 2025
   IP: 167.249.111.152
   Country: BR
   User-Agent: MEGAcmd/ (debian 13/Linux 6.12.38+deb13-amd64 x86_64) MegaClient/9.8.0/64

2 active sessions opened

for more options see:mega-session --help

mega-killsession

Terminate a session. Terminate a specific remote session by its ID. πŸ”ͺ

Identify Session ID with mega-session -l:

mega-killsession keA-ukFAUQk
Session keA-ukFAUQk killed successfully
πŸ’– Note: if you want to end all the sessions, bestie, just say: mega-killsession -a

for more options see: mega-killsession --help


πŸ¦‹ 3. Browse πŸ¦‹

  • mega-cd β€” Change remote directory => navigate to a specific folder in your MEGA account, like it's a lil hallway in your cloud house 🏠
    • Enter the directory: mega-cd "MyBackups/2024"
    • Exit in directory: mega-cd ..
    • For more options see: mega-cd --help
  • mega-lcd β€” Set the local directory for downloads β€” this is where your stuff lands on your own machine.
    • mega-lcd /home/user/Documents
    • For more options see: mega-Lcd --help
  • mega-ls β€” List files and folders ✨ it lists the contents of the Documents directory.
    • mega-ls "/file_directory"
    • For more options see: mega-ls --help
  • mega-pwd β€” Show local current path => display the current local working directory.
    • ``` mega-pwd / # In this example, the command shows that the user is at the root of the remote directory.
- For more options see: `mega-PWD --help`

- **`mega-lpwd`** β€” <pink>View the directory where downloads are saved</pink> πŸ“
- Create a directory to save the downloads: `mkdir ~/Dowloads/MegaCmd`
- Set the directory to save the Downloads: `mega-lcd ~/Dowloads/MegaCmd`
- Consult: `mega-lpwd`
- ```
home/user/Donloads/MegaCmd
  • for more options see: mega-lcd --help
  • mega-attr β€” Manage file attributes β€” list the attributes of a remote file and set a type attribute for it, slay πŸ’…
    • ``` mega-attr -l /path/to/remote/file mega-attr -s 120 /path/to/remote/file
- For more options see: `mega-attr --help`

- **`mega-du`** β€” <pink>Show used storage space</pink> β€” display the size of the contents under a folder πŸ‘€
- `mega-du "/directory/"`
- For more options see: `mega-du --help`

- **`mega-find`** β€” <pink>Find files</pink> β€” find all PDF files in your MEGA account.
- `mega-find "*.pdf"`
- For more options see: `mega-find --help`

- **`mega-mount`** β€” a "visual map" of your MEGA cloud storage's special folders πŸ—ΊοΈβœ¨
- ```
mega-mount
ROOT on / β†’ Root of your main storage.
INBOX on //in β†’ Inbox folder for files shared with your user.
RUBBISH on //bin β†’ Recycle bin (deleted files).
  • browse the Mega cloud folder: mega-ls /mega-rm / mega-cd
  • ``` mega-ls //bin file_test.txt
- for more options see: `mega-mount --help`

---

### πŸ“¦ 4. Moving / Copying files πŸ“¦

- **`mega-mkdir`** β€” <pink>Create remote directories</pink> β€” create one or more folders in your MEGA account πŸŽ€
- `mega-mkdir -p "/create/new_directory"`
- For more options see: `mega-mkdir --help`

- **`mega-cp`** β€” <pink>Copy files</pink> β€” copy a file to another location in your MEGA space.
- `mega-cp file_remoto.txt "/new_local_file/"`
- For more options see: `mega-cp --help`

- **`mega-put`** β€” <pink>Upload files to MEGA</pink> => upload a local file to MEGA ⬆️
- `mega-put local_file.pdf /`
- For more options see: `mega-put --help`

- **`mega-get`** β€” <pink>Download files from MEGA</pink> β€” download a file to a local directory ⬇️
- `mega-get file_remoto.txt ~/Downloads/`
- For more options see: `mega-get --help`

- **`mega-preview`** β€” <pink>Generate and view file preview</pink> β€” show a preview of an image πŸ–ΌοΈ
- `mega-preview "file_remoto.jpg" "./file_local_preview.jpg"`
- For more options see: `mega-preview --help`

- **`mega-thumbnail`** β€” <pink>Handle thumbnails of files</pink> β€” get or set a thumbnail for a file.
- `mega-thumbnail "/file_remoto 1.jpg" file_local.jpg`
- For more options see: `mega-thumbmail --help`

- **`mega-mv`** β€” <pink>Rename or move a file</pink> 🚚
- `mega-mv /oldname.txt /newname.txt`
- For more options see: `mega-mv --help`

- **`mega-rm`** β€” <pink>Remove files or folders</pink> β€” delete a file from your MEGA account. bye girl πŸ’€
- `mega-rm "/remote/oldfile.txt"`
- For more options see: `mega-rm --help`

- **`mega-transfers`** β€” <pink>List or operate with transfer</pink>.
- ```
mega-transfers --summary
NUM DOWNLOADS  DOWNLOADED       TOTAL    %             NUM
UPLOADS    UPLOADED       TOTAL    %
               0    0.00   B    0.00   B   0.00%
0    0.00   B    0.00   B   0.00%
  • For more options, see mega-transfers --help
  • mega-speedlimit β€” Limit transfer speed β€” set the transfer speed limit to 500 KB/s.
    • Usage: speedlimit [-u|-d|--upload-connections|--download-connections] [-h] [NEWLIMIT]
    • Displays/modifies upload/download rate limits: either speed or max connections
    • Options:
      • -d Set/Read download speed limit, expressed in size per second.
      • -u Set/Read upload speed limit, expressed in size per second.
      • --upload-connections Set/Read max number of connections for an upload transfer.
      • --download-connections Set/Read max number of connections for a download transfer.
    • Display options:
      • -h Human readable
    • ``` mega-speedlimit 0 Undo all settings mega-speedlimit Queries current settings
- ```
mega-speedlimit -d 2M Limits download to 2 MB/s
mega-speedlimit -d 0 Undo the settings
  • ``` mega-speedlimit -u 500K Limits upload to 500 KB/s mega-speedlimit -u 0 Undo the settings
- for more options see: `mega-speedlimit --help`

- **`mega-sync`** β€” <pink>Manage syncs</pink> β€” show the status of all synchronization jobs.
- `mega-sync local_directory/ /remote_directory` - Activate syncs.
- ```
mega-sync -Shows active syncs
 ID LOCALPATH REMOTEPATH RUN_STATE STATUS ERROR SIZE FILES DIRS
 plMQrYnWxP8 local_directory/ /remote_directory Running Synced
NO 3.15 GB 886 108
  • mega-sync -p plMQrYnWxP8 - Pause syncs.
  • mega-sync -e plMQrYnWxP8 - Resume syncs.
  • mega-sync -d plMQrYnWxP8 - Delete syncs.
  • For more options see: mega-sync --help
  • mega-sync-issues β€” Show sync issues => list files or folders that have sync problems 😭
    • mega-sync-issues – View current sync issues.
    • For more options, see mega-sync-issues --help
  • mega-sync-ignore β€” Ignore files from sync β€” exclude all temporary files from sync operations, we don't need that drama πŸ™ˆ
    • mega-sync-ignore --add -- -f:*.tmp /local/directory/ - Create a filter for files that should be ignored.
    • mega-sync-ignore --show /local/directory/ or --show DEFAULT - Displays sync status.
    • mega-sync-ignore --remove -- -f:*.tmp /synchronized/local_directory/ - Remove files from sync exclusion.
    • For more options see: mega-sync-ignore --help
  • mega-sync-config β€” Shows the internal settings for automatic synchronization.
    • mega-sync-config - Displays current configuration.
    • --delayed-uploads-wait-seconds - shows how many times a file can change quickly.
    • --delayed-uploads-wait-seconds - shows how many seconds the upload will be delayed.
    • For more options see: mega-sync-config --help
  • mega-exclude β€” Manages default exclusion rules in syncs.
    • mega-exclude -d "*.tmp" - Deletes pattern(s) from the exclusion list.
    • mega-exclude -a "*.tmp" - Adds pattern(s) to the exclusion list.
    • > ⚠️ Note: this command is DEPRECATED. Use sync-ignore instead.
    • For more options, see mega-exclude --help
  • 1mega-backup β€” Manage backups β€” create a backup of a remote folder πŸ’Ύ (yes, the page really does print it as 1mega-backup, that's what's on the tin, we report and we don't edit πŸ’…)
    • ``` mega-backup ~/photos/ /directory_remoto/ --period="1d" --num-backups=5
- Makes daily backups of the photos directory, keeping the 5 most recent versions.
- `mega-backup -h` - Displays the history of previous executions.
- `mega-backup -l` - Lists detailed information about all backups.
- ```
TAG   LOCALPATH
REMOTEPARENTPATH        STATUS
 1714  /home/user/photos
/create                 ACTIVE
  Max Backups:   5
  Period:         "1d"
  Next backup scheduled for: Wed, 30 Jul 2025 21:09:49 -0300
   -- CURRENT/LAST BACKUP --
  FILES UP/TOT     FOLDERS CREATED           PROGRESS
       1/1                0         1395.33/1395.33 KB  100.00%
  • mega-backup -d /home/user/photos - Remove the backup from the folder.
  • For more options, see mega-backp --help

πŸŽ€ 5. Sharing πŸŽ€

  • mega-export β€” Export a public link for a file β€” generate a public URL for a file πŸ”—
    • mega-export "directory/with/photos" -a
    • For more options see: mega-export --help
  • mega-import β€” Import a public link β€” import a file from a shared MEGA link into your account 🫢
  • mega-share β€” Share folders or files β€” share a remote folder with another user.
    • -p Show pending shares too
    • --with=email Determines the email of the user to [no longer] share with
    • -d Stop sharing with the selected user
    • -a Adds a share (or modifies it if existing)
    • --level=LEVEL Level of access given to the user
      • 0: Read access
      • 1: Read and write
      • 2: Full access
      • 3: Owner access
    • mega-share -a --with=user_share@example.com --level=0 /folder - Share a folder with read access.
    • mega-share -d --with=user_share@example.com /folder - Stop sharing with the selected user
    • For more options, see mega-share --help
  • mega-webdav β€” Start WebDAV server β€” start a WebDAV server exposing the specified remote folder on port 🌐
- to view your remote files, open your browser.
- > πŸ’‘ **Note:** see which port `mega-ftp` is running on:
- consult command: `sudo lsof -i -nP | grep mega-cmd`
- ```
 mega-cmd- 1364185        user_webdav  94u  IPv4 1895644
0t0  TCP 127.0.0.1:4443 (LISTEN)
  • for more options see: mega-webdav --help

🧚 6. FUSE 🧚

  • mega-fuse-add β€” Add a FUSE mount β€” add an additional FUSE mount point ✨
    • creates MEGA directory: mkdir MEGA

so here's literally what that looks like in the wild, bestie πŸ’– one command, one mount, one little table of truth:

mega-fuse-add /home/user/MEGA/ directory_remote
NAME             LOCAL_PATH        REMOTE_PATH
PERSISTENT     ENABLED
 directory_remote /home/user/MEGA  /directory_remote         YES
YES

orrr if you want it to have a name you'll actually recognise later (iconic move, do this):

mega-fuse-add ~/MEGA/ directory_remote --name=MyDocs
NAME             LOCAL_PATH        REMOTE_PATH
PERSISTENT     ENABLED
 MyDocs         /home/user/MEGA  /directory_remote         YES
YES

want even more knobs? run mega-fuse-add --help ✨


mega-fuse-remove

Remove a FUSE mount. Unmount and remove the FUSE mount point. bye bye πŸ‘‹

Removal can be done using NAME or LOCAL_PATH:

NAME             LOCAL_PATH          REMOTE_PATH
PERSISTENT ENABLED
 directory_remote   /home/user/MEGA   /directory_remote
YES       YES

so either of these works, fr fr:

mega-fuse-remove directory_remote or mega-fuse-remove /home/user/MEGA
Removed mount "directory_remote" on "/home/user/MEGA
⚠️ Note: Removal can only be done if the assembly is disabled β€” use mega-fuse-disable first. no shortcuts bestie 😭

for more options see: mega-fuse-remove --help

mega-fuse-enable

Enable FUSE integration. Enable FUSE support. we're BACK online πŸ’…

mega-fuse-enable directory_remote
Enabled mount "directory_remote" on "/home/user/MEGA"

consulting mega-fuse-show:

NAME             LOCAL_PATH          REMOTE_PATH
PERSISTENT ENABLED
 directory_remote   /home/user/MEGA   /directory_remote
YES       YES

for more options see: mega-fuse-enable --help

mega-fuse-disable

Disable FUSE integration => Disable FUSE support. nap time πŸ¦‹

mega-fuse-disable directory_remote
Disabled mount "directory_remote" on "/home/user/MEGA"

consulting mega-fuse-show:

NAME             LOCAL_PATH          REMOTE_PATH
PERSISTENT ENABLED
 directory_remote   /home/user/MEGA   /directory_remote
YES       NO

for more options see: mega-fuse-disable --help

mega-fuse-config

Configure advanced options for a FUSE mount. the glow-up station πŸŽ€

Parameters:

  • --enable-at-startup β€” Enables mount automatically when MEGAcmd starts.
  • --persistent (yes/no) β€” Keep the mount after restarting the service (except if --transient).
  • --read-only (yes/no) β€” Blocks modifications to the local file system.
  • --name β€” renames the mount (useful for identification).
NAME     LOCAL_PATH                  REMOTE_PATH PERSISTENT ENABLED
 MyDocs /home/user/MEGA-Documents /tcc        YES        YES

and here's you actually configuring it:

mega-fuse-config  MyDocs --enable-at-startup=yes --persistent=yes  --read-only=no
Mount "MyDocs" now has the following flags
  Name:               MeusDocs
  Enable at startup:  YES
  Persistent:         YES
  Read-only:          NO

for more options see: mega-fuse-config --help

mega-fuse-show

Show FUSE mount status. Display information about current FUSE mounts. the receipts πŸ“‹

mega-fuse-show
NAME             LOCAL_PATH        REMOTE_PATH
PERSISTENT     ENABLED
 directory_remote /home/user/MEGA  /directory_remote         YES
YES

for more options see: mega-fuse-show --help


✨ 7. Miscellaneous / Utility Commands ✨

mega-cancel

Cancel ongoing transfers or commands 🌈

mega-cancel [transfer_id]

For more options see: mega-cancel --help

mega-cat

Display file contents. Print the contents of a text file πŸ“

mega-cat "file_remote.txt"

For more options see: mega-cat --help

mega-cmd

Start MEGAcmd shell. Start the MEGAcmd interactive shell. main character energy, truly πŸ‘‘

mega-cmd
=================================================================================
       ___ __ ____  ____    _                      _
      |    | ___|/ ___|  /    ___ _ __ ___   __| |
      | || |   / |  _  / _  / __| '_ ` _  / _` |
      | |  | | /__ |_| |/ ___  (__| | | | | | (_| |
      |_|  |_|____|____/_/   ____|_| |_| |_|__,_|

Welcome to MEGAcmd! A Command Line Interactive and Scriptable
Application to interact with your MEGA account.
Please write to support@mega.nz if you find any issue or
have any suggestion concerning its functionalities.
Enter "help --non-interactive" to learn how to use MEGAcmd with scripts.
Enter "help" for basic info and a list of available commands.
==================================================================================
user@example.com:

For more options, see mega-cmd --help

mega-confirmcancel

Cancel signup confirmation. Cancel an ongoing account confirmation request. πŸ™ˆ

mega-confirmcancel
Usage: confirmcancel link password
Confirms the cancellation of your MEGA account
Caution: The account under this email address will be permanently closed
and your data deleted. This can not be undone.
πŸ’€ Caution: the account under this email address will be permanently closed and your data deleted. This can not be undone. like… it's giving irreversible. be so sure.

for more options see: mega-confirmcancel --help

mega-cmd-server

Run MEGAcmd as a service. Run the MEGAcmd server as a background daemon. πŸŒ™

mega-cmd-server --daemon or mega-cmd-server &

For more options, see mega-cmd-server --help

mega-debug

Enable debug logging. Enable detailed debug logging. πŸ”

mega-debug  - Verbose active mode
mega-log -sc 2 - Disable verbose mode

For more options, see mega-debug --help

mega-deleteversions

Delete previous file versions. This will permanently delete all historical versions of a file. no undo, bestie 😭

mega-deleteversions -f --all

For further details, see mega-deleteversions --help

mega-df

Shows total storage used in the account, storage per main folder (see mount). the vibe check on your gigabytes πŸ’Ύ

mega-df -h
Cloud drive:               5.17 GB in    2641 file(s) and 287 folder(s)
Inbox:                    0.00   B in       0 file(s) and 0 folder(s)
Rubbish bin:              0.00   B in       0 file(s) and 0 folder(s)
---------------------------------------------------------------------------
USED STORAGE:              5.17 GB                       10.35% of 50.00 GB

For more options, see mega-df --help

mega-errorcode

Describe error codes. Explain the meaning of error code 17. πŸ‘€

mega-errorcode 0 Everything OK

yep, that's you asking about code 0 and getting Everything OK back. and here's the Full table:

             Full table
         Code Error message
        0    Everything OK
        1    Internal error
        2    Invalid argument
        3    Request failed, retrying
        4    Rate limit exceeded
        5    Failed permanently
        6    Too many concurrent connections or transfers
        7    Out of range
        9    Not found

for more options see: mega-errorcode --help

mega-exec

Execute shell commands remotely. Run a shell command on the remote MEGA filesystem. remote control but make it legal 🧚

mega-exec ls -la /remote/folder
FLAGS VERS      SIZE            DATE       NAME
 d---    -            - 27Jul2025 16:25:37 new_directory
 d---    -            - 29Jul2025 21:12:58 tcpdump_bk_20250729210949
 ----    1      5411303 27Jul2025 17:19:49 853779-hd_1920_1080_25fps.mp4
 ----    1        15629 01Feb2025 23:00:54 audio_456440__inspectorj__bird-whistling-robin-single-13.ogg

For more options, see mega-exec --help

mega-ftp

Launch FTP server. Start an FTP server: 🌐

mega-ftp /directory_remote
Serving via ftp directory_remote:
ftp://127.0.0.1:4990/GwQG3CzJ/directory_remote

to view files shared remotely via ftp locally, open your file manager and access the link:

ftp://127.0.0.1:4990/GwQG3CzJ/directory_remote
Note: want to see which port mega-ftp is running on? consult this command: sudo lsof -i -nP | grep mega-cmd
mega-cmd- 1364185  user_ftp     86u  IPv4  1857531      0t0  TCP 127.0.0.1:4990 (LISTEN)

for more options see: mega-ftp --help

mega-graphics

Show graphics info for images. Display metadata and graphics properties of an image. πŸ–ΌοΈ

mega-graphics /remote/picture.png

For more options see: mega-graphics --help

mega-help

Show help for commands. Display help information for MEGAcmd commands. the mother of all help 🫢

mega-help
Here is the list of available commands and their usage

Options:

   Use "mega-help -f" to get a brief description of the commands

   Use "mega-help -ff" to get a complete description of all commands.

   Use "mega-help --non-interactive" to learn how to use MEGAcmd with scripts.

   Use "mega-help --upgrade" to learn about the limitations and obtaining PRO accounts.

   Use "mega-help --paths" to learn about paths and how to enter them.

   Use "help --paths" to learn about paths and how to enter them.
Note: You can get further help on a specific command with "command --help"

for more options see: mega-help --help

mega-https

Set https preferences => Enable HTTPS for transfers. πŸ”’

Usage: https [on|off]
Shows if HTTPS is used for transfers. Use "https on" to enable it.
  • mega-https on β€” Enable
  • mega-https off β€” Disable
  • mega-https β€” Check current status

for more options see: mega-https --help

mega-mediainfo

Prints media info of remote files. Show detailed media information (codec, bitrate, duration). 🎬

mega-mediainfo directory/video_file.mp4 or
mega-mediainfo --path-display-size=N directory/video_file.mp4

For more options see: mega-mediainfo --help

mega-log

Command configures and displays MEGAcmd logs. πŸ“

mega-log

okay so the whole level thing is literally a vibe scale, and here's the full breakdown so you never have to guess what you're signing up for:

  • 0 β€” FATAL β€” only the critical errors, the ones that may crash MEGAcmd. like, actual emergencies only πŸ’€
  • 1 β€” ERROR β€” serious errors that need to be fixed. no skipping these bestie.
  • 2 β€” WARNING β€” warnings + errors. the little "hey maybe look at this" tier.
  • 3 β€” INFO β€” general information about executed commands. the default girlie.
  • 4 β€” DEBUG β€” detailed debugging messages. for when you're being nosy on purpose πŸ”
  • 5 β€” VERBOSE β€” maximum verbosity, including very detailed logs. absolutely unhinged amounts of text, and honestly? iconic. 🫢

for more options see: mega-log --help


πŸŽ€ mega-permissions πŸŽ€

Shows/establishes the default permissions for files and folders that MEGAcmd creates. your house, your rules, periodt πŸ’…

  • mega-permissions --files β€” view the default file permissions.
  • mega-permissions --folders β€” view the default folder permissions.
  • mega-permissions --files --s 644 β€” set the default file permissions to 644.
  • mega-permissions --folders --s 755 β€” set the default folder permissions to 755.

For more options, see mega-permissions --help


🌐 mega-proxy 🌐

Configure the proxy and set a proxy server for MEGAcmd. giving very much "I know a guy" energy.

Hand it a proxy and it's on:

mega-proxy http://127.0.0.1:3128 # Enabled

Hand it off and it's off:

mega-proxy off # Disabled

And if you give it no parameter at all, it just prints the proxy configuration back at you, like:

Proxy configured.
Type = CUSTOM
URL = http://127.0.0.1:3128

or, alternatively:

mega-proxy
Proxy configured.
Type = CUSTOM
URL = off
Note: to use the mega-proxy command, you need to enable a proxy first. no proxy, no proxy command, that's the law ✨

for more options see: mega-proxy --help


πŸ‘‹ mega-quit πŸ‘‹

Exit the MEGAcmd shell. bye bestie, love u, mean it πŸ₯Ή

mega-quit
Note: notice that the session will still be active, and local caches available. The session will be resumed when the service is restarted. so it's not a goodbye, it's a "brb" 🌸

for more options see: mega-quit --help


πŸ”„ mega-reload πŸ”„

Forces a reload of the remote files of the user, and it will also summarize synchronizations. a full little refresh moment, slay.

mega-reload

For more options, see mega-reload --help


🌳 mega-tree 🌳

Display a tree view of a folder. Show a tree of all folders and files under /Projects, like this:

mega-tree "/Projects"

For more options see: mega-tree --help


⭐ mega-version ⭐

Show version info β€” as in, show the current version of MEGAcmd.

mega-version

Usage: version [-l][-c]

Prints MEGAcmd versioning and extra info.

Options:

  • -c β€” Shows changelog for the current version.
  • -l β€” Show extended info: MEGA SDK version and features enabled.

So like, mega-version -l gets you the whole receipts list:

MEGAcmd version: 2.1.1.0: code 2010100
MEGA SDK version: f80cfee
MEGA SDK Credits: https://github.com/meganz/sdk/blob/master/CREDITS.md
MEGA SDK License: https://github.com/meganz/sdk/blob/master/LICENSE
MEGAcmd License: https://github.com/meganz/megacmd/blob/master/LICENSE
MEGA Terms: https://mega.nz/terms
MEGA General Data Protection Regulation Disclosure: https://mega.nz/gdpr
Features enabled:
 * CryptoPP
 * SQLite
 * inotify
 * fdopendir
 * FreeImage
 * sync subsystem

for more options see: mega-version --help


πŸ’– SEE ALSO πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

  • Written by MEGA Limited. Manual organized and compiled by the Debian maintainer.
  • by Josenilson Ferreira da Silva <nilsonfsilva@hotmail.com>
  • for the Debian project (but may be used by others).

and that's the whole page bestie, we did it πŸŽ‰ this was the MEGAcmd Manual, dated July 2025, sitting at section MEGACMD(1) β€” credit where it's due, love u, go run some commands πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from