How to Install AWS CLI on Ubuntu 24.04 LTS

In this article, we will cover How to Install AWS CLI on Ubuntu 24.04 LTS using Snap Package Manager, Install AWS CLI using tar.gz Source File and Install AWS CLI using pip installer.

The AWS CLI is a valuable tool for anyone who wants to efficiently manage AWS resources, automate tasks, and leverage the power of the AWS API. In this article we will show how to install AWS CLI on Ubuntu 24.04.

  • SSH Access with admin privileges
  • Ubuntu 24.04 LTS with minimal installation

AWS CLI can be installed in three ways which are mentioned below:

  1. Snap Package Manager  
  2. tar.gz Source File 
  3. Pip Installer  

Use the Snap package manager to install the AWS CLI in ‘classic’ mode:

sudo snap install aws-cli --classic
How to Install AWS CLI on Ubuntu 24.04 LTS 1

After the installation is complete, you can verify it by checking the version of AWS CLI installed:

aws --version
How to Install AWS CLI on Ubuntu 24.04 LTS 2

To uninstall the AWS CLI on Ubuntu 24.04 using the Snap package manager, follow this step:

sudo snap remove aws-cli
How to Install AWS CLI on Ubuntu 24.04 LTS 3

To install the AWS CLI on Ubuntu 24.04 from a tar.gz source file, follow these steps:

Download the AWS CLI tar.gz File using curl

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
How to Install AWS CLI on Ubuntu 24.04 LTS 4
sudo apt install unzip
How to Install AWS CLI on Ubuntu 24.04 LTS 5
unzip awscliv2.zip
How to Install AWS CLI on Ubuntu 24.04 LTS 6
sudo ./aws/install
How to Install AWS CLI on Ubuntu 24.04 LTS 7
aws --version
How to Install AWS CLI on Ubuntu 24.04 LTS 8
sudo rm -rf /usr/local/bin/aws
How to Install AWS CLI on Ubuntu 24.04 LTS 9
aws --version
How to Install AWS CLI on Ubuntu 24.04 LTS 10

To install the AWS CLI on Ubuntu 24.04 using the pip installer, follow these steps:

Update Your Package List

sudo apt update
How to Install AWS CLI on Ubuntu 24.04 LTS 11

 If pip is not already installed, you can install it using the following command:

sudo apt install python3-pip
How to Install AWS CLI on Ubuntu 24.04 LTS 12

Use pip to install the AWS CLI:

pip3 install awscli --break-system-packages
How to Install AWS CLI on Ubuntu 24.04 LTS 13

After the installation is complete, you can verify it by checking the version of AWS CLI installed:

After the installation is complete, you can verify it by checking the version of AWS CLI installed:

pip show awscli
How to Install AWS CLI on Ubuntu 24.04 LTS 14

To uninstall the AWS CLI on Ubuntu 24.04, follow these steps:

pip3 uninstall awscli --break-system-packages
How to Install AWS CLI on Ubuntu 24.04 LTS 15

To ensure that the AWS CLI has been successfully removed, you can check the version:

aws --version
How to Install AWS CLI on Ubuntu 24.04 LTS 16

The AWS CLI is a valuable tool for efficiently managing and interacting with Amazon Web Services (AWS) from your Ubuntu 24.04 system.

Following the steps outlined in this article, you can successfully install the AWS CLI and configure it to access your AWS resources. With the AWS CLI at your disposal, you can automate tasks, script complex workflows, and leverage the full power of AWS services from the comfort of your Ubuntu terminal.

Related Articles:

How to Install AWS CLI on Ubuntu 20.04/18.04/16.04 LTS

Reference:

Get started with the AWS CLI official page

Harish Reddy

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share via
Copy link
Powered by Social Snap