How to Install AWS CLI on Linux Step-by-Step

This post describes how to install AWS CLI on linux step-by-step. AWS CLI is a command line interface which allows us to interact with our AWS account. Developer and sysadmin use aws cli to perform day to day activities and automation.


  • Pre-Installed Linux System
  • Sudo User with admin rights
  • Internet Connectivity

Without any further delay, let’s jump into AWS Cli installations steps.

1) Download Installation File

Open the terminal and run following curl command to download aws cli installation file,

$ curl "" -o ""


Above command will download file as ‘’ in current working directory.

Execute below ls command to verify downloaded file,

$ ls -l
-rw-rw-r-- 1 linuxtechi linuxtechi 47244662 Oct 20 10:53

2) Unzip Downloaded Installation File

Run beneath unzip command to unzip the installer.

$ unzip

It will create aws folder in present working directory and unzip all required files into it.

$ ls -ld aws
drwxr-xr-x 3 linuxtechi linuxtechi 4096 Oct 19 17:18 aws

3) Install AWS Cli on Linux Using Install Script

To install aws cli, run following install script,

$ sudo ./aws/install

Install AWS Cli on Linux

Script will install all files under /usr/local/aws-cli and will create symbolic link in /usr/local/bin.

4) Verify AWS CLI version

To verify the aws cli version, run

$ aws --version
aws-cli/2.8.4 Python/3.9.11 Linux/5.15.0-48-generic exe/x86_64.ubuntu.22 prompt/off

5) Configure AWS CLI

To verify the AWS Cli installation, let’s configure aws cli.

Login to your AWS management console and retrieve AWS access key id and secret access key.

In case it is not created yet then create access key ID and secret access key. Copy these keys somewhere safe.


Now head back to Linux terminal, run following aws command,

$ aws configure
AWS Access Key ID [None]: xxxxxxxxxxxxxxxxxxx
AWS Secret Access Key [None]: xxxxxxxxxxxxxxxxxxx
Default region name [None]: us-west-2
Default output format [None]: json

Above credentials will be saved in following file,

$ cat  ~/.aws/credentials

Output of above commands,


Run aws command to list s3 bucket and vpc of your account.

$ aws s3 ls
$ aws ec2 describe-vpcs



Output above confirms that aws cli has been configured successfully.

That’s all from this post, feel free to post your queries and feedback in below comments sections.

Also Read: How to Setup EKS Cluster along with NLB on AWS

Share on:

I am a Cloud Consultant with over 15 years of experience in Linux, Kubernetes, cloud technologies (AWS, Azure, OpenStack), automation (Ansible, Terraform), and DevOps. I hold certifications like RHCA, CKA, CKAD, CKS, AWS, and Azure.

Leave a Comment