Skip to content
Follow
Ubuntu Linux

How to Install AWS CLI on Ubuntu

Richard
Written by
Richard
Dec 2, 2023 Updated Aug 13, 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) lets you control cloud servers and file storage straight from your Ubuntu terminal without opening a web browser. Version 2 is the most stable and up-to-date release for managing your Amazon Web Services accounts on a Linux computer.

You only need a few minutes and a terminal window to download and set up the tool on your Ubuntu system. This quick walkthrough shows you every step to get the installer running on your PC today.

⚡ 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.

Install AWS CLI from Ubuntu’s repository

Ubuntu’s Universe repository provides a quick installation route, though packages there occasionally lag behind the absolute newest release.

Open the terminal and run the command below.

🐧Bash / Shell
sudo apt install awscli

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

💻Code
aws --version

Install AWS CLI from Amazon

Grabbing the official installer directly from Amazon offers another reliable route. Download the zip file using the ‘curl’ command, extract it with ‘unzip’, and execute the setup script to finish configuring the environment.

🐧Bash / Shell
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.

💻Code
aws --version

Install AWS CLI via Python PiP

Python's package manager provides a solid alternative if a Python environment already exists on the machine. This route pulls down the necessary tools to handle AWS management straight from the command line.

🐧Bash / Shell
sudo apt update

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

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.

🐧Bash / Shell
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.

🐧Bash / Shell
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:

💻Code
aws --version

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

Configuring AWS CLI

Linking an AWS account requires running the 'aws configure' command after installation completes. Prompts request the Access Key ID, Secret Access Key, default region, and output format to authorize future terminal commands.

💻Code
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.

📚 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 *