Top Related Projects
MinIO is a high-performance, S3 compatible object store, open sourced under GNU AGPLv3 license.
Universal Command Line Interface for Amazon Web Services
Azure Command-Line Interface
"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Official s3cmd repo -- Command line tool for managing S3 compatible storage services (including Amazon S3 and CloudFront).
Quick Overview
The minio/mc repository is a command-line interface (CLI) tool for interacting with various cloud storage services, including Amazon S3, Google Cloud Storage, and Azure Blob Storage. It provides a unified interface for managing objects across multiple cloud providers, making it a versatile tool for developers and system administrators.
Pros
- Cross-Platform Compatibility: The mc tool is available for multiple operating systems, including Windows, macOS, and Linux, making it accessible to a wide range of users.
- Unified Interface: The tool provides a consistent command-line interface for managing objects across different cloud storage providers, simplifying the management of multi-cloud environments.
- Scripting and Automation: The CLI nature of the tool allows for easy integration into scripts and automation workflows, enhancing productivity and efficiency.
- Performance: The mc tool is designed to be fast and efficient, with features like parallel uploads and downloads to optimize data transfer speeds.
Cons
- Learning Curve: The tool's extensive set of features and commands may have a steeper learning curve for users unfamiliar with command-line interfaces or cloud storage management.
- Limited GUI: While the mc tool is primarily a command-line interface, some users may prefer a graphical user interface (GUI) for certain tasks, which is not provided out of the box.
- Dependency on Cloud Providers: The tool's functionality is dependent on the availability and stability of the underlying cloud storage providers, which can be a potential point of failure.
- Limited Offline Functionality: The mc tool requires an active internet connection to interact with cloud storage services, limiting its usefulness in scenarios with limited or unreliable network connectivity.
Getting Started
To get started with the minio/mc tool, follow these steps:
- Download the appropriate binary for your operating system from the official releases page.
- Extract the downloaded archive and move the
mc
binary to a directory in your system'sPATH
. - Open a terminal or command prompt and run the following command to verify the installation:
mc --version
This should display the version of the mc tool installed on your system.
- To configure the tool to work with a specific cloud storage provider, use the
mc config host add
command. For example, to configure the tool to work with Amazon S3, you can run:
mc config host add s3 https://s3.amazonaws.com YOUR_ACCESS_KEY YOUR_SECRET_KEY
Replace YOUR_ACCESS_KEY
and YOUR_SECRET_KEY
with your actual AWS credentials.
- Once the host is configured, you can use the mc tool to interact with the cloud storage service. For example, to list the contents of an S3 bucket, you can run:
mc ls s3/my-bucket
This will display the objects stored in the my-bucket
S3 bucket.
The minio/mc tool provides a wide range of commands for managing objects, buckets, and other cloud storage resources. You can explore the available commands by running mc help
or by referring to the official documentation.
Competitor Comparisons
MinIO is a high-performance, S3 compatible object store, open sourced under GNU AGPLv3 license.
Pros of MinIO
- Full-featured object storage server with extensive API support
- Highly scalable and suitable for large-scale deployments
- Supports advanced features like erasure coding and bitrot protection
Cons of MinIO
- More complex setup and configuration compared to mc
- Higher resource requirements for running a full server
- Steeper learning curve for new users
Code Comparison
MinIO (server-side object creation):
putObject := func(bucket, object string, data []byte) error {
_, err := minioClient.PutObject(context.Background(), bucket, object, bytes.NewReader(data), int64(len(data)), minio.PutObjectOptions{})
return err
}
mc (client-side object creation):
copyObject := func(source, target string) error {
cmd := exec.Command("mc", "cp", source, target)
return cmd.Run()
}
Summary
MinIO is a comprehensive object storage server, while mc is a lightweight command-line client for interacting with S3-compatible storage. MinIO offers more advanced features and scalability but requires more resources and setup. mc is simpler to use and better suited for basic operations and scripting, but lacks the full feature set of MinIO. The choice between them depends on specific use cases and requirements.
Universal Command Line Interface for Amazon Web Services
Pros of aws-cli
- Comprehensive support for all AWS services and features
- Extensive documentation and community support
- Seamless integration with AWS ecosystem and IAM roles
Cons of aws-cli
- Larger installation size and more dependencies
- Steeper learning curve for users unfamiliar with AWS
- Limited to AWS-specific operations
Code Comparison
aws-cli:
aws s3 cp local-file.txt s3://my-bucket/
aws s3 ls s3://my-bucket/
aws s3 rm s3://my-bucket/file-to-delete.txt
mc:
mc cp local-file.txt myminio/my-bucket/
mc ls myminio/my-bucket/
mc rm myminio/my-bucket/file-to-delete.txt
The code comparison shows that mc has a simpler syntax and is more concise for basic operations. aws-cli requires the s3
subcommand for S3-related operations, while mc uses a more straightforward approach.
mc offers a more unified interface for working with different object storage providers, including MinIO and S3-compatible systems. It's lightweight and easier to use for basic operations, making it a good choice for users who prioritize simplicity and cross-compatibility.
aws-cli, on the other hand, is the official tool for AWS and provides comprehensive coverage of all AWS services. It's the better choice for users deeply integrated into the AWS ecosystem and requiring access to a wide range of AWS-specific features.
Azure Command-Line Interface
Pros of azure-cli
- Comprehensive coverage of Azure services and features
- Extensive documentation and community support
- Integration with Azure Cloud Shell for web-based CLI access
Cons of azure-cli
- Larger installation size and resource footprint
- Steeper learning curve due to the wide range of commands and options
- Slower command execution compared to mc's lightweight design
Code Comparison
azure-cli:
az storage blob upload --account-name mystorageaccount --container-name mycontainer --name myblob --file /path/to/file
mc:
mc cp /path/to/file myminio/mybucket/myobject
Key Differences
- Scope: azure-cli is specific to Azure services, while mc is designed for MinIO and S3-compatible storage
- Command structure: azure-cli uses a more verbose command structure, while mc opts for concise commands
- Functionality: azure-cli offers a broader range of features for Azure management, whereas mc focuses on object storage operations
Use Cases
- azure-cli: Ideal for managing and interacting with various Azure services in a unified CLI
- mc: Best suited for efficient object storage operations across MinIO and S3-compatible systems
Both tools serve different purposes and excel in their respective domains. The choice between them depends on the specific cloud environment and required functionality.
"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Pros of rclone
- Supports a wider range of cloud storage providers and protocols
- More advanced features like encryption, caching, and mounting
- Larger and more active community, resulting in frequent updates and improvements
Cons of rclone
- Steeper learning curve due to more complex configuration options
- Slightly slower performance for some operations compared to mc
- Larger binary size and higher resource usage
Code comparison
mc:
mc cp file.txt myminio/mybucket/
mc ls myminio/mybucket/
rclone:
rclone copy file.txt remote:bucket/
rclone ls remote:bucket/
Both tools offer similar basic functionality for file operations, but rclone provides more advanced options and flags for fine-tuning transfers and operations.
rclone is generally more versatile and feature-rich, supporting a wider range of cloud storage providers and offering advanced features like encryption and mounting. However, mc is more straightforward and may be easier to use for simple MinIO-specific tasks.
The choice between the two depends on your specific needs: if you're primarily working with MinIO and want a simpler tool, mc might be preferable. For those requiring broader cloud storage support and advanced features, rclone is likely the better option.
Official s3cmd repo -- Command line tool for managing S3 compatible storage services (including Amazon S3 and CloudFront).
Pros of s3tools/s3cmd
- Supports a wider range of cloud storage providers, including AWS S3, Google Cloud Storage, and Azure Blob Storage.
- Provides a more comprehensive set of features, such as support for object versioning, lifecycle policies, and server-side encryption.
- Has a larger user community and more extensive documentation.
Cons of s3tools/s3cmd
- Can be more complex to configure and use, especially for users who are primarily working with a single cloud storage provider.
- May have a steeper learning curve compared to minio/mc, which is designed to be more user-friendly.
- Requires the installation of additional Python dependencies, which can be a drawback for some users.
Code Comparison
minio/mc:
mc cp /path/to/local/file s3/my-bucket/remote-file.txt
s3tools/s3cmd:
s3cmd put /path/to/local/file s3://my-bucket/remote-file.txt
The main difference in the code is the command syntax. minio/mc uses the mc cp
command, while s3tools/s3cmd uses the s3cmd put
command. The overall functionality, however, is similar in both cases - uploading a local file to a remote S3 bucket.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
MinIO Client Quickstart Guide
Documentation
MinIO Client (mc) provides a modern alternative to UNIX commands like ls, cat, cp, mirror, diff, find etc. It supports filesystems and Amazon S3 compatible cloud storage service (AWS Signature v2 and v4).
alias manage server credentials in configuration file
admin manage MinIO servers
anonymous manage anonymous access to buckets and objects
batch manage batch jobs
cp copy objects
cat display object contents
diff list differences in object name, size, and date between two buckets
du summarize disk usage recursively
encrypt manage bucket encryption config
event manage object notifications
find search for objects
get get s3 object to local
head display first 'n' lines of an object
ilm manage bucket lifecycle
idp manage MinIO IDentity Provider server configuration
license license related commands
legalhold manage legal hold for object(s)
ls list buckets and objects
mb make a bucket
mv move objects
mirror synchronize object(s) to a remote site
od measure single stream upload and download
ping perform liveness check
pipe stream STDIN to an object
put upload an object to a bucket
quota manage bucket quota
rm remove object(s)
retention set retention for object(s)
rb remove a bucket
replicate configure server side bucket replication
ready checks if the cluster is ready or not
sql run sql queries on objects
stat show object metadata
support support related commands
share generate URL for temporary access to an object
tree list buckets and objects in a tree format
tag manage tags for bucket and object(s)
undo undo PUT/DELETE operations
update update mc to latest release
version manage bucket versioning
watch listen for object notification events
Docker Container
Stable
docker pull minio/mc
docker run minio/mc ls play
Edge
docker pull minio/mc:edge
docker run minio/mc:edge ls play
Note: Above examples run mc
against MinIO play environment by default. To run mc
against other S3 compatible servers, start the container this way:
docker run -it --entrypoint=/bin/sh minio/mc
then use the mc alias
command.
GitLab CI
When using the Docker container in GitLab CI, you must set the entrypoint to an empty string.
deploy:
image:
name: minio/mc
entrypoint: ['']
stage: deploy
before_script:
- mc alias set minio $MINIO_HOST $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
script:
- mc cp <source> <destination>
macOS
Homebrew
Install mc packages using Homebrew
brew install minio/stable/mc
mc --help
GNU/Linux
Binary Download
Platform | Architecture | URL |
---|---|---|
GNU/Linux | 64-bit Intel | https://dl.min.io/client/mc/release/linux-amd64/mc |
GNU/Linux | 64-bit PPC | https://dl.min.io/client/mc/release/linux-ppc64le/mc |
GNU/Linux | 64-bit ARM | https://dl.min.io/client/mc/release/linux-arm64/mc |
Linux/s390x | S390X | https://dl.min.io/client/mc/release/linux-s390x/mc |
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
./mc --help
Microsoft Windows
Binary Download
Platform | Architecture | URL |
---|---|---|
Microsoft Windows | 64-bit Intel | https://dl.min.io/client/mc/release/windows-amd64/mc.exe |
mc.exe --help
Install from Source
Source installation is only intended for developers and advanced users. If you do not have a working Golang environment, please follow How to install Golang. Minimum version required is go1.22
go install github.com/minio/mc@latest
Add a Cloud Storage Service
If you are planning to use mc
only on POSIX compatible filesystems, you may skip this step and proceed to everyday use.
To add one or more Amazon S3 compatible hosts, please follow the instructions below. mc
stores all its configuration information in ~/.mc/config.json
file.
mc alias set <ALIAS> <YOUR-S3-ENDPOINT> <YOUR-ACCESS-KEY> <YOUR-SECRET-KEY> --api <API-SIGNATURE> --path <BUCKET-LOOKUP-TYPE>
<ALIAS>
is simply a short name to your cloud storage service. S3 end-point, access and secret keys are supplied by your cloud storage provider. API signature is an optional argument. By default, it is set to "S3v4".
Path is an optional argument. It is used to indicate whether dns or path style url requests are supported by the server. It accepts "on", "off" as valid values to enable/disable path style requests.. By default, it is set to "auto" and SDK automatically determines the type of url lookup to use.
Example - MinIO Cloud Storage
MinIO server startup banner displays URL, access and secret keys.
mc alias set minio http://192.168.1.51 BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12
Example - Amazon S3 Cloud Storage
Get your AccessKeyID and SecretAccessKey by following AWS Credentials Guide.
mc alias set s3 https://s3.amazonaws.com BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12
Note: As an IAM user on Amazon S3 you need to make sure the user has full access to the buckets or set the following restricted policy for your IAM user
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowBucketStat",
"Effect": "Allow",
"Action": [
"s3:HeadBucket"
],
"Resource": "*"
},
{
"Sid": "AllowThisBucketOnly",
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::<your-restricted-bucket>/*",
"arn:aws:s3:::<your-restricted-bucket>"
]
}
]
}
Example - Google Cloud Storage
Get your AccessKeyID and SecretAccessKey by following Google Credentials Guide
mc alias set gcs https://storage.googleapis.com BKIKJAA5BMMU2RHO6IBB V8f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12
Test Your Setup
mc
is pre-configured with https://play.min.io, aliased as "play". It is a hosted MinIO server for testing and development purpose. To test Amazon S3, simply replace "play" with "s3" or the alias you used at the time of setup.
Example:
List all buckets from https://play.min.io
mc ls play
[2016-03-22 19:47:48 PDT] 0B my-bucketname/
[2016-03-22 22:01:07 PDT] 0B mytestbucket/
[2016-03-22 20:04:39 PDT] 0B mybucketname/
[2016-01-28 17:23:11 PST] 0B newbucket/
[2016-03-20 09:08:36 PDT] 0B s3git-test/
Make a bucket
mb
command creates a new bucket.
Example:
mc mb play/mybucket
Bucket created successfully `play/mybucket`.
Copy Objects
cp
command copies data from one or more sources to a target.
Example:
mc cp myobject.txt play/mybucket
myobject.txt: 14 B / 14 B ââââââââââââââââââââââââââââââââââââââââââââââ 100.00 % 41 B/s 0
Everyday Use
Shell aliases
You may add shell aliases to override your common Unix tools.
alias ls='mc ls'
alias cp='mc cp'
alias cat='mc cat'
alias mkdir='mc mb'
alias pipe='mc pipe'
alias find='mc find'
Shell autocompletion
In case you are using bash, zsh or fish. Shell completion is embedded by default in mc
, to install auto-completion use mc --autocompletion
. Restart the shell, mc will auto-complete commands as shown below.
mc <TAB>
admin config diff find ls mirror policy session sql update watch
cat cp event head mb pipe rm share stat version
Contribute to MinIO Project
Please follow MinIO Contributor's Guide
License
Use of mc
is governed by the GNU AGPLv3 license that can be found in the LICENSE file.
Top Related Projects
MinIO is a high-performance, S3 compatible object store, open sourced under GNU AGPLv3 license.
Universal Command Line Interface for Amazon Web Services
Azure Command-Line Interface
"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Official s3cmd repo -- Command line tool for managing S3 compatible storage services (including Amazon S3 and CloudFront).
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot