UbuntuUbuntu Based

How To Install AWS CLI on Ubuntu 22.04 LTS

Install AWS CLI on Ubuntu 22.04

In this tutorial, we will show you how to install AWS CLI on Ubuntu 22.04 LTS. The Amazon Web Services (AWS) Command Line Interface (CLI) is a powerful, unified tool that enables developers and system administrators to manage and automate AWS services directly from the command line. With AWS CLI, you can control multiple AWS services and implement a level of automation that’s not possible with the AWS Management Console.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the AWS CLI on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.


  • A server running one of the following operating systems: Ubuntu 22.04, 20.04, and any other Debian-based distribution like Linux Mint.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • Basic knowledge of the Linux command-line interface (CLI). This guide assumes you’re comfortable with executing commands in a terminal.
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for AWS CLI.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install AWS CLI on Ubuntu 22.04 LTS Jammy Jellyfish

Step 1. First, it’s always a good practice to update the system packages. Open your terminal and type the following commands:

sudo apt update
sudo apt upgrade

These commands will fetch the list of available updates and then upgrade your system packages. This ensures that you have the latest security patches and performance improvements.

Step 2. Installing AWS CLI on Ubuntu 22.04.

Next, we will install AWS CLI using the APT package manager. Type the following command in your terminal:

sudo apt install awscli

During the installation process, you may be prompted to confirm the installation. Press ‘Y‘ and then ‘Enter‘ to continue. The APT package manager will handle the rest, downloading and installing the necessary packages.

After the installation is complete, it’s important to verify that AWS CLI has been installed correctly. You can do this by checking the version of AWS CLI. Type the following command in your terminal:

aws --version

The output should display the version number of AWS CLI. If you see the version number, it means AWS CLI has been installed successfully.

Step 3. Configure AWS CLI.

Now that AWS CLI is installed, the next step is to configure it. Type the following command in your terminal:

aws configure

You will be prompted to enter the following details:

  • AWS Access Key ID
  • AWS Secret Access Key
  • Default region name
  • Default output format

Enter the details as prompted. These credentials are stored in the ~/.aws/credentials file.

Step 4. Test AWS CLI.

After configuring AWS CLI, it’s a good idea to test it to ensure it’s working as expected. Here are a couple of simple commands you can use:

aws s3 ls
aws ec2 describe-instances

The first command lists all your S3 buckets, and the second command describes your EC2 instances. If the output is as expected, it means AWS CLI is working correctly.

If for any reason you need to uninstall AWS CLI, you can do so using the following command:

sudo apt remove awscli

Congratulations! You have successfully installed AWS CLI. Thanks for using this tutorial for installing AWS CLI on the Ubuntu 22.04 LTS Jammy Jellyfish system. For additional help or useful information, we recommend you check the official AWS CLI website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button