MEGACMD(1)
π¦ 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
- Enter the directory:
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 theDocumentsdirectory.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:
-dSet/Read download speed limit, expressed in size per second.-uSet/Read upload speed limit, expressed in size per second.--upload-connectionsSet/Read max number of connections for an upload transfer.--download-connectionsSet/Read max number of connections for a download transfer.
- Display options:
-hHuman readable
- ``` mega-speedlimit 0 Undo all settings mega-speedlimit Queries current settings
- Usage:
- ```
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-ignoreinstead. - 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 as1mega-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-import 'https://mega.nz/file/abc123'- For more options see:
mega-import --help
mega-shareβ Share folders or files β share a remote folder with another user.-pShow pending shares too--with=emailDetermines the email of the user to [no longer] share with-dStop sharing with the selected user-aAdds a share (or modifies it if existing)--level=LEVELLevel 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 πmega-webdav directory_remote- ``` Serving via webdav /directory_remote: http://127.0.0.1:4443/GwQG3CzJ/directory_remote
- 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
- creates MEGA directory:
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 portmega-ftpis 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β Enablemega-https offβ Disablemega-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 to644.mega-permissions --folders --s 755β set the default folder permissions to755.
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 π
- MEGAcmd documentation at https://mega.nz/cmd
π 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
- ubuntu stonking: megacmd 2.5.2-2build1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms