Skip to content
Follow
Ubuntu Linux

How to Install AWS CLI on Ubuntu

Richard
Written by
Richard
Dec 2, 2023 Updated Sep 15, 2026 3 min read
How to Display Seconds on Ubuntu Top Menu Clock
How to Display Seconds on Ubuntu Top Menu Clock

The AWS CLI (Amazon Web Services Command Line Interface) is a tool that lets you manage your cloud servers and file storage straight from your Ubuntu terminal without opening a web browser. Version 2 is the current release for running commands on your Amazon Web Services accounts from a Linux computer.

Advertisement

You only need a few minutes and an open terminal window to download and set up the software on your system.

⚡ Quick Answer

You install the AWS CLI on Ubuntu by downloading the official installer package from Amazon and running it with unzip and the install script. Alternatively, you can use apt install awscli or pip3 install awscli. Verify the installation with aws –version.

Advertisement

Install AWS CLI from Ubuntu’s repository

Installing the AWS CLI from Ubuntu’s Universe repository (a community-maintained collection of software packages) is the fastest way to get set up on your machine. Open the terminal and run sudo apt install awscli to download the program. Once the installation finishes, run aws –version to check that the tool works correctly.

Open the terminal and run the command below.

sudo apt install awscli

Once installed, run the command below to verify if AWS CLI is installed.

aws --version

Install AWS CLI from Amazon

Downloading the official installer directly from Amazon is the best way to get the newest version of the AWS CLI. First, install curl and unzip using sudo apt install curl unzip. Then, grab the official package by running curl “https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip” -o “awscliv2.zip” in your terminal.

Advertisement
sudo apt install curl unzip
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

Next, run the commands below to extract and install the downloaded file.

To confirm the AWS Command Line Interface (AWS CLI) installation, run `aws --version` in your terminal to check the AWS CLI version. This command displays the installed version number, confirming the software is ready for use with your AWS services.

aws --version

Install AWS CLI via Python PiP

Using PIP (Python's package manager) provides a solid alternative to install the AWS CLI if Python is already on your machine. Start by running sudo apt update to refresh your package lists so your system is ready for the new software installation.

sudo apt update

This command updates the package lists, preparing the system for upgrades and new installations.

Advertisement

Install Python and PIP

The AWS Command Line Interface (AWS CLI) requires Python and PIP (Python Package Installer) for installation. System prerequisites install by running the command `sudo apt update && sudo apt install python3-pip awscli -y` in the terminal.

sudo apt install python3 python3-pip -y

Install AWS CLI using PIP

PIP handles installing or upgrading the AWS Command Line Interface (CLI) via the following command: `sudo apt install awscli`. Running this refreshes the AWS CLI to its latest version on the Ubuntu system.

Advertisement
sudo pip3 install --upgrade awscli

This command places the AWS CLI globally across the system.

Verify the Installation

Checking the version verifies whether the AWS CLI is installed correctly:

aws --version

Successful installations display the active version information directly in the terminal.

Advertisement

Configuring AWS CLI

Linking your AWS account requires running the aws configure command after the installation finishes. Type aws configure in your terminal and press enter. The prompt asks for your AWS Access Key ID, Secret Access Key, default region, and default output format to authorize your commands.

aws configure

The prompt asks for the AWS Access Key ID, Secret Access Key, default region, and default output format. Providing accurate credentials aligns the tool with the correct cloud account.

Conclusion

  • The AWS CLI is a powerful tool that allows you to manage AWS services from the command line
  • You can install the AWS CLI on Ubuntu Linux using various methods such as Ubuntu's Universe repository, direct download from AWS, or via Python PIP
  • After installation, verify the installation and configure the AWS CLI with your AWS account access keys
  • With the AWS CLI successfully installed and configured, you can begin efficiently managing various AWS services directly from your terminal

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

Advertisement

📚 Related Tutorials

How to Install Python Pip on Ubuntu Linux
Ubuntu Linux How to Install Python Pip on Ubuntu Linux
How to Install Python on Ubuntu Linux
Ubuntu Linux How to Install Python on Ubuntu Linux
Working with Sudo and Su Commands in Ubuntu Linux
Ubuntu Linux Working with Sudo and Su Commands in Ubuntu Linux
How to Install Ubuntu Linux
Ubuntu Linux How to Install Ubuntu Linux

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *