To install the AWS CLI (Command Line Interface) on Ubuntu, follow these steps:
1. Update the Package Index
Run the following command to ensure your package list is up-to-date:
sudo apt update 2. Install Dependencies
Ensure you have the necessary dependencies installed:
sudo apt install -y unzip curl 3. Download the AWS CLI Installer
Use curl to download the AWS CLI v2 installer:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" 4. Extract the Installer
Unzip the downloaded file:
unzip awscliv2.zip 5. Run the Installer
Run the installation script:
sudo ./aws/install 6. Verify the Installation
Confirm that the AWS CLI is installed and check its version:
aws --version You should see output similar to:
aws-cli/2.x.x Python/x.x.x Linux/x.x.x 7. Clean Up
(Optional) Remove the downloaded files to free up space:
rm -rf awscliv2.zip aws 8. Configure the AWS CLI
Set up your AWS credentials:
aws configure You’ll need to provide:
- Access Key ID
- Secret Access Key
- Default region (e.g.,
us-east-1) - Output format (e.g.,
json,text, ortable)
Top comments (0)