The **MinIO Client (`mc`)** provides a modern alternative to UNIX commands for interacting with S3-compatible object storage. This guide summarizes commonly used commands. --- ## Aliases (`mc alias`) Aliases are used to manage S3 server connections. * **List all aliases:** ```bash mc alias ls ``` * **List a specific alias:** ```bash mc alias ls ``` * **Remove an alias:** ```bash mc alias rm ``` * **Set a new alias:** ```bash mc alias set --api ``` * **Export alias to JSON:** ```bash mc alias export | tee object-st.json ``` * **Import alias from JSON:** ```bash mc alias import ``` --- ## Listing Objects (`mc ls`) * **List bucket contents:** ```bash mc ls /// ``` * **List with versions:** ```bash mc ls --versions /// ``` --- ## Copying Files (`mc cp`) * **Upload file to bucket:** ```bash mc cp /// ``` * **Download file from bucket:** ```bash mc cp // ``` * **Download specific version:** ```bash mc cp --version-id // ``` --- ## Viewing Files (`mc cat`) * **View file contents:** ```bash mc cat // ``` --- ## Moving Files (`mc mv`) * **Move from local to bucket:** ```bash mc mv /// ``` * **Move specific version from bucket:** ```bash mc mv --version-id // ``` --- ## Removing Files (`mc rm`) * **Remove file:** ```bash mc rm ///file ``` * **Force remove specific version:** ```bash mc rm --force --version-id ///file ``` --- ## Creating Buckets (`mc mb`) * **Create a bucket:** ```bash mc mb / ``` * **Create a bucket with versioning:** ```bash mc mb --with-versioning / ``` * **Create a bucket with object lock:** ```bash mc mb --with-lock / ``` --- ## Removing Buckets (`mc rb`) * **Remove a bucket:** ```bash mc rb / ``` * **Force remove a bucket:** ```bash mc rb --force / ``` --- ## Health Check (`mc ping`) * **Ping a server:** ```bash mc ping --count ``` --- ## Tree View (`mc tree`) * **Display bucket tree structure:** ```bash mc tree / ```