mc, the MinIO client, is one way to work with a bucket from the command line, built by the
same team behind the SDKs E2E recommends. You need a bucket and an access key first; see
Generate an access key.
Install mc
Section titled “Install mc”Download mc from MinIO’s
AIStor Client download page. Choose your operating
system and architecture there, and the page shows the file to download and the commands to
install it. On a 64-bit Intel or AMD Linux machine, for example:
wget https://dl.min.io/aistor/mc/release/linux-amd64/mcchmod +x mcOn macOS, install it with Homebrew instead:
brew install minio/aistor/mcAn mc you installed earlier from MinIO’s older download links keeps working with every
command on this page.
Confirm it runs (mc.exe --help on Windows):
mc --helpAdd it to your PATH (for example, mv mc /usr/local/bin on Linux or macOS) so you can run it
from anywhere.
Add your bucket as an alias
Section titled “Add your bucket as an alias”mc alias set <alias-name> <endpoint-url> <access-key> <secret-key>Use https://objectstore.e2enetworks.net for a Delhi bucket, or the Chennai endpoint from
S3 compatibility for one there, along
with the access key and secret key from
Generate an access key. Pick a
short, memorable alias-name: you will use it in every mc command on this page instead of typing your
credentials again. When the alias is saved, mc confirms it:
Added `<alias-name>` successfully.Check that the alias reaches your bucket by listing it. Each object prints on its own line, with the time it was last changed, its size, and its name:
mc ls <alias-name>/<bucket-name>/[2026-09-23 10:15:02 IST] 1.2MiB STANDARD report.pdf[2026-09-23 10:16:40 IST] 48KiB STANDARD notes.txtAn empty bucket prints nothing. An access denied error means the key is not attached to this bucket, or its role does not allow what you asked; see Generate an access key.
An older release of mc may not know mc alias. Update it, or use the older form of the same command:
mc config host add <alias-name> <endpoint-url> <access-key> <secret-key>Work with objects
Section titled “Work with objects”List what is in a bucket:
mc ls <alias-name>/<bucket-name>/Upload a file:
mc cp <local-file> <alias-name>/<bucket-name>/Add --recursive to copy a whole folder. Remove an object:
mc rm <alias-name>/<bucket-name>/<object-name>To clear out a bucket but keep the bucket itself, remove every object in it at once. This cannot be undone, so check the bucket name first:
mc rm --recursive --force <alias-name>/<bucket-name>/The bucket’s Empty action in MyAccount does the same from the dashboard.
Check how much space a bucket is using:
mc du <alias-name>/<bucket-name>/Search for an object by name:
mc find <alias-name>/<bucket-name>/ --name "<pattern>"Print an object’s contents straight to your terminal, or pipe data from another command straight into one:
mc cat <alias-name>/<bucket-name>/<object-name><some-command> | mc pipe <alias-name>/<bucket-name>/<object-name>Print only the first few lines of a large object instead of the whole thing:
mc head -n <line-count> <alias-name>/<bucket-name>/<object-name>mc pipe streams data into a bucket without writing it to disk first, which suits backups. This dumps a MySQL database straight into a bucket:
mysqldump -u <db-user> -p <db-name> | mc pipe <alias-name>/<bucket-name>/backups/<db-name>.sqlEnter the database password when asked; the dump uploads as it is written. When your prompt comes back, the file is in the bucket, and you can list it with mc ls <alias-name>/<bucket-name>/backups/.
For a scheduled backup with s3cmd instead,
see Back up a MySQL database to E2E Object Storage.
Remove an upload that failed partway through instead of a finished object:
mc rm --incomplete <alias-name>/<bucket-name>/<object-name>Generate a presigned download link, valid for the duration you set:
mc share download <alias-name>/<bucket-name>/<object-name> --expire=<duration>Replace <duration> with a number followed by h for hours, m for minutes, or s for
seconds, for example --expire=12h. A link can last at most 7 days, which is 168h.
Check a bucket is reachable, and list every version of every object if Object Versioning is on:
mc ready <alias-name>/<bucket-name>/mc ping <alias-name>/<bucket-name>/ --count 4mc ls --recursive --versions <alias-name>/<bucket-name>/Update mc itself to the latest version:
mc updateWork that happens outside mc
Section titled “Work that happens outside mc”mc works on the objects inside the buckets your key is attached to. Creating a bucket,
listing every bucket on your account, and turning on public access happen in the dashboard or
through the MyAccount API. The same goes for mc’s admin commands, such as mirror, watch,
policy, admin, and config, because an access key reaches objects in its buckets, not the
account itself. See
S3 compatibility for the full picture,
including why a permission-related warning during setup is expected and safe to ignore.
If a command fails, see Troubleshooting E2E Object Storage.