In this guide, you will find:
How to Install AWS CLI on Debian 12
You can install AWS CLI on Debian 12 from:
How to Install AWS CLI on Debian 12 from Source Repository
AWS CLI is available in the default Debian repository, making it the most straightforward approach to install it. You can install AWS CLI on Debian 12 from the source repository using the below-given apt install command:
After the installation, you can check the AWS CLI version using the below-given command to ensure it is successfully installed on Debian 12:
How to Remove AWS CLI from Debian 12
If you have installed AWS CLI from the default repository, you can remove it any time from Debian system using the below-given command:
How to Install AWS CLI on Debian 12 from pip Installer
You can also install AWS CLI on Debian 12 from the pip installer besides installing it from the source repository. The advantage of installing AWS CLI through pip is that you will be able to install an updated version of the application.
To install AWS CLI on Debian 12, run the pip command followed by the awscli keyword and –break-system-packages to ensure it is installed without an externally managed environment error:
Note: If you are using another Debian version, you don’t need to add the –break-system-packages keyword.
How to Remove AWS CLI from pip on Debian 12
If you want to remove AWS CLI installed through pip on Debian 12, simply run the following command:
How to Install AWS CLI on Debian 12 Through Zip File
If you want to install the AWS CLI latest version on Debian 12, you can download the zip file from the official AWS website and then install CLI through it. The step-by-step guide to install AWS CLI through the zip file is provided below:
Step 1: Download AWS CLI Zip File
First, download the AWS CLI zip file on Debian 12 from the terminal using the following command:
Note: If you experience curl command not found error, install curl on Debian 12 from the following command:
Step 2: Unzip AWS CLI Zip File
Now, unzip the AWS CLI zip file on Debian 12 from the following command:
Step 3: Install AWS CLI on Debian 12
Next, navigate to AWS source directory on Debian using the cd command:
Then run the AWS CLI installation script with sudo privileges on Debian using:
Step 4: Check AWS CLI Version on Debian
To check AWS CLI is successfully installed on Debian 12, run the following command:
Step 5: Make AWS CLI Global
You must set the path environment for AWS CLI so that your system will know where it is installed. You can set the path variable for AWS CLI on Debian by opening the bashrc file using the following command:
Then add the following line inside this bashrc file:
Step 6: Save the File and Changes
You must save the bashrc file using CTRL+X, add Y and press Enter, then use the source command to make the changes to the system:
Step 7: Check AWS CLI Version on Debian
To confirm AWS CLI is globally set for Debian users, simply run the following version command:
How to Install AWS CLI on Debian 12 from Snap Store
You can also use Snap Store to install AWS CLI on Debian 12, this can be done using the following steps:
Step 1: Install Snap Daemon on Debian 12
First, install Snap Daemon on Debian 12 using the following command so that you will be able to use the snap command to install packages from the Snap Store:
Step 2: Install AWS CLI from Snap Store
You can now install AWS CLI on Debian 12 from the Snap Store using the following command:
Note: Reboot the system in order to make changes after you have installed AWS CLI from the Snap Store.
How to Remove AWS CLI from Snap Store on Debian 12
You can remove AWS CLI from Snap Store on Debian 12 using the below-given command:
How to Use AWS CLI on Debian 12
After you have successfully installed AWS CLI on Debian 12, it’s now time to configure it. For that, you must have an account on AWS; after creating an account, you will be provided with the Access Key ID, Secret Access Key and other login credentials. This information will be used during the configuration phase while running AWS CLI on Debian. For more details, check the configuration section of the guide.
Conclusion
AWS CLI is a powerful command-line utility used for interacting with the AWS from the terminal. You can install AWS CLI on Debian 12 directly through source repository or pip, but these methods install older versions of the utility. You can install the latest AWS CLI version via the zip method from the above section of this guide. Besides that, you can also use Snap Store to install a slightly older AWS CLI version on Debian 12 compared to the zip method. Once completed, you can use AWS CLI to start working with your AWS projects directly from the terminal.