In this blog post, I will show you to install AWS CLI version 2 on Linux CentOS and avoid common issues.
Check PATH
The first thing you need to check which paths are configured in your $PATH and note down a path you would like to install the CLI.
To check you paths run:
echo $PATH
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2020/06/image-2.png)
In my case, I will install in on /usr/bin because it is in my $PATH.
Install
Once you know the path, run the following commands:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
Note: Below I am specifying the path, if you don’t do that it wil go to /usr/local/bin/aws and you will get an error (bash: aws: command not found).
./aws/install -i /usr/bin/aws-cli -b /usr/bin
check installation
If you followd this guide correcty you should the AWS version when running
aws --version
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2020/06/image-3.png)
Processing…
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.