# AWS CLI
AWS CLI can be installed using `apt`:
```sh
sudo apt install awscli
```
## S3
Before accessing S3 buckets the CLI needs to be configured.
![[Three Write-Up#^a8cnbc]]
To list buckets simply use the `ls` command:
```sh
aws --endpoint=<S3 endpoint> s3 ls
```
To list files inside a bucket specify it after `ls`:
```sh
aws --endpoint=<S3 endpoint> s3 ls s3://<bucket name>
```
To copy files use `cp`:
```sh
aws --endpoint=<S3 endpoint> s3 cp <local path> s3://<bucket and path>
```
## Hack The Box Machines
- [[Three Write-Up|Three]]