---
title: Working with CLI
---
This tutorial contains steps for using the S3-compatible CLI with the Object Store. We recommend using MinIO CLI (`mc`) for the best experience.
## Download MinIO Client (mc)
- **Linux (64-bit Intel)**: [Download](https://dl.min.io/client/mc/release/linux-amd64/mc)
- **Linux (64-bit PPC)**: [Download](https://dl.min.io/client/mc/release/linux-ppc64le/mc)
- **Windows (64-bit)**: [Download](https://dl.min.io/client/mc/release/windows-amd64/mc.exe)
- **MacOS**: `brew install minio/stable/mc`
For other methods, visit MinIO documentation [here](https://docs.min.io/docs/minio-client-complete-guide).
## Run the Client
Check that the client is downloaded correctly by running the following command from the directory where the binary file is saved.
- **macOS**:
```bash
mc --help
```
- **Windows**:
```bash
mc.exe --help
```
- **GNU/Linux**:
```bash
chmod +x mc
./mc --help
```
:::tip Note
Add `mc` to the environment path
You may optionally add `mc` to your environment path for further convenience. For example:
- **GNU/Linux or macOS**:
```bash
mv mc /usr/local/bin
./mc --help
```
:::
## Save Storage Credentials
Object Store supports the creation of multiple access credentials (keys) from the storage section in My Account. After generating or creating an access key, you will be provided with an `mc` config command:
```bash
mc alias set
```
- **access_key**: You can generate an access key from **My Account > Storage > Object Storage > Manage Access**.
- **secret_key**: Obtain this the same way as the access key.
- **key_name**: This can be any meaningful name, something easy to remember as you will use this with every `mc` command.
:::tip Note
Here is an example:
```bash
mc alias set test2 https://objectstore.e2enetworks.net FADSF2322FADF23 ADF23FASDFASDF342ASDF
```
The above command will save a storage credential with the name wp_creds in your system. From here on, you can access bucket contents granted to this access key with the use of the string wp_creds.
This way, you don't have to pass credentials (access/secret key) each time you run the mc command, instead you refer to wp_creds.
:::
:::info Note
If you are using mc version earlier than RELEASE.2025-05-21T01-59-54Z then use below command:
```bash
mc config host add
```
Here is an example:
```bash
mc config host add ESTWE https://objectstore.e2enetworks.net 4SG71BPL234234FBTZDQS7L 4F13TOK3PNIMJWR5RMX2323JKULVAX7E4M5PGNC3OI8M
```
:::
## List Objects
The following command lists the objects in a storage bucket named **wp_bucket**. Here, the access key **wp_creds** has been granted permission to **wp_bucket** from the storage browser in my account.
```bash
./mc ls wp_creds/wp_bucket/
```
Under the hood, the mc uses the saved credentials wp_creds to connect to the E2E Object Store.
## List Buckets
Object store currently does not support listing buckets from CLI. You can view your buckets from storage browser (My account > **Storage**).
## Make Bucket
Object store currently does not support creating buckets from CLI. You can create your buckets from storage browser (My account > **Storage**).
## View Object Content
Use **cat** command to view contents of objects in your bucket. You can also use head command to display top few lines of an object.
To view **terms.txt** from **customer_terms** directory in **wp_bucket**:
```bash
mc cat wp_creds/wp_bucket/customer_terms/terms.txt
```
To display first **5** lines from **terms.txt**:
```bash
mc head -n 5 wp_creds/wp_bucket/customer_terms/terms.txt
```
## Pipe Content
You can use pipe command to write contents directly to E2E Object store from command line.
To stream MySQL Database dump to Object store directly:
```bash
mysqldump -u root -p ***** customer_db | mc pipe wp_creds/wp_bucket/customers/backup.sql
```
## Copy or Upload content
You can copy content from local system to object store using cp command. The copy operations to object store are verified with MD5SUM checksums. Interrupted or failed attempts can be resumed from the point of failure.
To copy customer **terms.txt** to **customer_terms** path (created if does not exist) in **wp_bucket**:
```bash
mc cp terms.txt wp_creds/wp_bucket/customer_terms/terms.txt
```
To copy a folder recursively:
```bash
mc cp —recursive local_dir wp_creds/wp_bucket/
```
## Remove Content
Use `rm` command to delete file or object.
To remove a **terms.txt** from wp_bucket/customer_terms:
```bash
mc rm wp_creds/wp_bucket/customer_terms/terms.txt
```
To remove **all objects** from **a bucket**:
```bash
mc rm —recursive —force wp_creds/wp_bucket
```
To remove all **incomplete uploaded files** for an object:
```bash
mc rm —incomplete wp_creds/wp_bucket/terms.txt
```
## Bucket Status & Object Utilities
### Check Bucket Status
```bash
mc ready
mc ping --count 4
```
### Check Object Size
```bash
mc du
```
### Search for an Object by Name
```bash
mc find | find ""
```
### Generate a Pre-signed URL for Download
```bash
mc share download --expire=
```
### Check Versioning Status of Objects
```bash
mc ls --recursive --versions
```
## Update mc client
To update your mc client to the latest version
```bash
mc update
```
:::info Note
For source based installations of mc client the mc update command does not support update notifications.
:::
## Share Content
Object store does not support sharing configuration from CLI. To enable a bucket for public or anonymous upload and download, you can visit the bucket permissions tab in storage browser (my account).
## Unsupported Commands
Currently we do not support the following commands offered by mc.
- mirror
- watch
- policy
- admin
- config
Object store is evolving project, so you can expect these in near future. In case any of these commands are limiting your workflow then please write to us at `cloud-platform@e2networks.com`.
---