Installing AWS CLI on Ubuntu adds the aws command to the shell for identity checks, profile-based work, and repeatable AWS service calls from local terminals, remote servers, and automation jobs.
Current AWS guidance for Ubuntu supports the vendor AWS CLI version 2 installer and the official snap package. The ZIP installer keeps the install consistent on standard Ubuntu shells without depending on snapd, and it avoids the release-specific lag or package absence that can still affect distro repositories.
AWS CLI version 1 and version 2 use the same aws command name. Older APT, snap, or pip installs can still shadow /usr/local/bin/aws after the new install, and ARM64 systems must use the Linux aarch64 archive instead of the x86_64 file shown in the default download step.
Related: How to check AWS CLI version
Related: How to configure AWS CLI on Linux and macOS
Related: Install AWS CLI version 1 using pip
$ sudo apt update
$ sudo apt install curl unzip
curl downloads the installer archive, and unzip extracts it before the bundled installer runs.
$ uname -m x86_64
x86_64 uses the default download URL below, while aarch64 uses the Linux ARM archive in the next step.
$ curl "https://awscli.amazonaws.com/\ awscli-exe-linux-x86_64.zip" \ -o "awscliv2.zip"
If the previous step returned aarch64, replace x86_64 with aarch64 in the download URL.
$ unzip awscliv2.zip
$ sudo ./aws/install You can now run: aws --version
The default install directory is /usr/local/aws-cli and the default symlink path is /usr/local/bin/aws. If those paths already contain a manual AWS CLI v2 install, rerun the installer later with sudo ./aws/install --update instead of creating a second copy.
$ command -v aws /usr/local/bin/aws
If the shell still resolves /usr/bin/aws, /snap/bin/aws, or ~/.local/bin/aws, the bundled install is not the active command yet.
$ aws --version aws-cli/2.34.32
The exact version, bundled Python runtime, and platform string change over time. The decisive result is that the command returns an aws-cli/2.x version line. Related: How to check AWS CLI version
$ aws sts \ get-caller-identity \ --query Account \ --output text 123456789012
Use aws configure, aws configure sso, or aws login before this step on a new host. Related: How to configure AWS CLI on Linux and macOS
Related: How to log in to AWS CLI with IAM Identity Center
Related: How to check the current caller identity in AWS CLI
$ rm -r aws awscliv2.zip
Removing these files does not uninstall AWS CLI from /usr/local/aws-cli.